mirror of https://github.com/v2ray/v2ray-core
KCP: amend proxyMeta -> *proxymeta
parent
4f9a9d1f0c
commit
0912574166
|
@ -64,19 +64,19 @@ func DialWithoutCache(src v2net.Address, dest v2net.Destination) (net.Conn, erro
|
||||||
return dialer.Dial(dest.Network().String(), dest.NetAddr())
|
return dialer.Dial(dest.Network().String(), dest.NetAddr())
|
||||||
}
|
}
|
||||||
|
|
||||||
func Dial3(src v2net.Address, dest v2net.Destination, proxyMeta proxy.OutboundHandlerMeta) (*Connection, error) {
|
func Dial3(src v2net.Address, dest v2net.Destination, proxyMeta *proxy.OutboundHandlerMeta) (*Connection, error) {
|
||||||
if proxyMeta.KcpSupported && transport.IsKcpEnabled() {
|
if proxyMeta.KcpSupported && transport.IsKcpEnabled() {
|
||||||
DialKCP3(src, dest, proxyMeta)
|
DialKCP3(src, dest, proxyMeta)
|
||||||
}
|
}
|
||||||
return Dial(src, dest)
|
return Dial(src, dest)
|
||||||
}
|
}
|
||||||
func DialWithoutCache3(src v2net.Address, dest v2net.Destination, proxyMeta proxy.OutboundHandlerMeta) (net.Conn, error) {
|
func DialWithoutCache3(src v2net.Address, dest v2net.Destination, proxyMeta *proxy.OutboundHandlerMeta) (net.Conn, error) {
|
||||||
if proxyMeta.KcpSupported && transport.IsKcpEnabled() {
|
if proxyMeta.KcpSupported && transport.IsKcpEnabled() {
|
||||||
}
|
}
|
||||||
return DialWithoutCache(src, dest)
|
return DialWithoutCache(src, dest)
|
||||||
}
|
}
|
||||||
|
|
||||||
func DialKCP3(src v2net.Address, dest v2net.Destination, proxyMeta proxy.OutboundHandlerMeta) (*Connection, error) {
|
func DialKCP3(src v2net.Address, dest v2net.Destination, proxyMeta *proxy.OutboundHandlerMeta) (*Connection, error) {
|
||||||
if src == nil {
|
if src == nil {
|
||||||
src = v2net.AnyIP
|
src = v2net.AnyIP
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ func ListenKCPhub(address v2net.Address, port v2net.Port, callback ConnectionHan
|
||||||
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) {
|
func ListenTCP6(address v2net.Address, port v2net.Port, callback ConnectionHandler, proxyMeta *proxy.InboundHandlerMeta, tlsConfig *tls.Config) (*TCPHub, error) {
|
||||||
if proxyMeta.KcpSupported && transport.IsKcpEnabled() {
|
if proxyMeta.KcpSupported && transport.IsKcpEnabled() {
|
||||||
return ListenKCPhub(address, port, callback, tlsConfig)
|
return ListenKCPhub(address, port, callback, tlsConfig)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue