mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00
general: change NextDialer func
This commit is contained in:
parent
e4be140711
commit
6cf3070d7d
5
http.go
5
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) {
|
||||
|
2
mixed.go
2
mixed.go
@ -20,8 +20,8 @@ var httpMethods = [...][]byte{
|
||||
// MixedProxy struct
|
||||
type MixedProxy struct {
|
||||
dialer Dialer
|
||||
|
||||
addr string
|
||||
|
||||
http *HTTP
|
||||
socks5 *SOCKS5
|
||||
}
|
||||
|
@ -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) {
|
||||
|
2
ss.go
2
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user