diff --git a/socks.go b/socks.go index 3f7c76c..1f9a625 100755 --- a/socks.go +++ b/socks.go @@ -16,14 +16,15 @@ const ( addrTypeIPv6 = 0x04 ) -type dialFunc func(network, addr string) (net.Conn, error) +// DialFunc the function dial to remote +type DialFunc func(network, addr string) (net.Conn, error) // Conn present a client connection type Conn struct { net.Conn // the function to dial to upstream server // when nil, use net.Dial - Dial dialFunc + Dial DialFunc // username for socks5 server Username string // password diff --git a/socks4.go b/socks4.go index 7472b90..6e9b1de 100755 --- a/socks4.go +++ b/socks4.go @@ -34,7 +34,7 @@ byte | 0 | 1 | 2 | 3 | 4 | 5 | 6| 7 | type socks4Conn struct { serverConn net.Conn clientConn net.Conn - dial dialFunc + dial DialFunc } func (s4 *socks4Conn) Serve() { diff --git a/socks5.go b/socks5.go index 13f8ef1..0535555 100755 --- a/socks5.go +++ b/socks5.go @@ -56,7 +56,7 @@ type socks5Conn struct { //addr string clientConn net.Conn serverConn net.Conn - dial dialFunc + dial DialFunc } func (s5 *socks5Conn) Serve() {