mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-16 17:38:45 -05:00
Func: ListenTCP6
This commit is contained in:
parent
2fd963801c
commit
e51710d144
@ -8,6 +8,8 @@ import (
|
|||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"github.com/v2ray/v2ray-core/common/log"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||||
|
"github.com/v2ray/v2ray-core/proxy"
|
||||||
|
"github.com/v2ray/v2ray-core/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -47,6 +49,14 @@ func ListenTCP(address v2net.Address, port v2net.Port, callback ConnectionHandle
|
|||||||
go hub.start()
|
go hub.start()
|
||||||
return hub, nil
|
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() {
|
func (this *TCPHub) Close() {
|
||||||
this.accepting = false
|
this.accepting = false
|
||||||
|
Loading…
Reference in New Issue
Block a user