diff --git a/transport/hub/tcp.go b/transport/hub/tcp.go index 49b59d00..c3e89120 100644 --- a/transport/hub/tcp.go +++ b/transport/hub/tcp.go @@ -8,6 +8,8 @@ import ( "github.com/v2ray/v2ray-core/common/log" v2net "github.com/v2ray/v2ray-core/common/net" + "github.com/v2ray/v2ray-core/proxy" + "github.com/v2ray/v2ray-core/transport" ) var ( @@ -47,6 +49,14 @@ func ListenTCP(address v2net.Address, port v2net.Port, callback ConnectionHandle go hub.start() return hub, nil } +func ListenTCP6(address v2net.Address, port v2net.Port, callback ConnectionHandler, proxyMeta proxy.InboundHandlerMeta, tlsConfig *tls.Config) (*TCPHub, error) { + if proxyMeta.KcpSupported && transport.IsKcpEnabled() { + return nil, errors.New("ListenTCP6: Not Implemented") + } else { + return ListenTCP(address, port, callback, tlsConfig) + } + return nil, errors.New("ListenTCP6: Not Implemented") +} func (this *TCPHub) Close() { this.accepting = false