From 09125741663564ff5f44fcfa137338bc616e4bfd Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Sun, 12 Jun 2016 13:45:21 +0800 Subject: [PATCH] KCP: amend proxyMeta -> *proxymeta --- transport/hub/dialer.go | 6 +++--- transport/hub/tcp.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/transport/hub/dialer.go b/transport/hub/dialer.go index b9d99a45..ca56051f 100644 --- a/transport/hub/dialer.go +++ b/transport/hub/dialer.go @@ -64,19 +64,19 @@ func DialWithoutCache(src v2net.Address, dest v2net.Destination) (net.Conn, erro 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() { DialKCP3(src, dest, proxyMeta) } 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() { } 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 { src = v2net.AnyIP } diff --git a/transport/hub/tcp.go b/transport/hub/tcp.go index b230d655..8f63d3ab 100644 --- a/transport/hub/tcp.go +++ b/transport/hub/tcp.go @@ -71,7 +71,7 @@ func ListenKCPhub(address v2net.Address, port v2net.Port, callback ConnectionHan go hub.start() 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() { return ListenKCPhub(address, port, callback, tlsConfig) } else {