diff --git a/http.go b/http.go index ba8a937..2e7e3cf 100644 --- a/http.go +++ b/http.go @@ -25,8 +25,7 @@ type HTTP struct { password string xff bool // X-Forwarded-For xsi bool // X-Server-IP - - selfip string + selfip string } // NewHTTP returns a http proxy. @@ -213,7 +212,7 @@ func (s *HTTP) servHTTPS(method, requestURI, proto string, c net.Conn) { func (s *HTTP) Addr() string { return s.addr } // NextDialer returns the next dialer -func (s *HTTP) NextDialer(dstAddr string) Dialer { return s.dialer } +func (s *HTTP) NextDialer(dstAddr string) Dialer { return s.dialer.NextDialer(dstAddr) } // Dial connects to the address addr on the network net via the proxy. func (s *HTTP) Dial(network, addr string) (net.Conn, error) { diff --git a/mixed.go b/mixed.go index 85e20a7..fc29de6 100644 --- a/mixed.go +++ b/mixed.go @@ -20,8 +20,8 @@ var httpMethods = [...][]byte{ // MixedProxy struct type MixedProxy struct { dialer Dialer - addr string + http *HTTP socks5 *SOCKS5 } diff --git a/socks5.go b/socks5.go index 71c47c5..b4c1e5a 100644 --- a/socks5.go +++ b/socks5.go @@ -219,7 +219,7 @@ func (s *SOCKS5) ListenAndServeUDP() { func (s *SOCKS5) Addr() string { return s.addr } // NextDialer returns the next dialer -func (s *SOCKS5) NextDialer(dstAddr string) Dialer { return s.dialer } +func (s *SOCKS5) NextDialer(dstAddr string) Dialer { return s.dialer.NextDialer(dstAddr) } // Dial connects to the address addr on the network net via the SOCKS5 proxy. func (s *SOCKS5) Dial(network, addr string) (net.Conn, error) { diff --git a/ss.go b/ss.go index 4e6e612..617af55 100644 --- a/ss.go +++ b/ss.go @@ -204,7 +204,7 @@ func ListCipher() string { func (s *SS) Addr() string { return s.addr } // NextDialer returns the next dialer -func (s *SS) NextDialer(dstAddr string) Dialer { return s.dialer } +func (s *SS) NextDialer(dstAddr string) Dialer { return s.dialer.NextDialer(dstAddr) } // Dial connects to the address addr on the network net via the proxy. func (s *SS) Dial(network, addr string) (net.Conn, error) {