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
3
http.go
3
http.go
@ -25,7 +25,6 @@ type HTTP struct {
|
|||||||
password string
|
password string
|
||||||
xff bool // X-Forwarded-For
|
xff bool // X-Forwarded-For
|
||||||
xsi bool // X-Server-IP
|
xsi bool // X-Server-IP
|
||||||
|
|
||||||
selfip string
|
selfip string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,7 +212,7 @@ func (s *HTTP) servHTTPS(method, requestURI, proto string, c net.Conn) {
|
|||||||
func (s *HTTP) Addr() string { return s.addr }
|
func (s *HTTP) Addr() string { return s.addr }
|
||||||
|
|
||||||
// NextDialer returns the next dialer
|
// 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.
|
// Dial connects to the address addr on the network net via the proxy.
|
||||||
func (s *HTTP) Dial(network, addr string) (net.Conn, error) {
|
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
|
// MixedProxy struct
|
||||||
type MixedProxy struct {
|
type MixedProxy struct {
|
||||||
dialer Dialer
|
dialer Dialer
|
||||||
|
|
||||||
addr string
|
addr string
|
||||||
|
|
||||||
http *HTTP
|
http *HTTP
|
||||||
socks5 *SOCKS5
|
socks5 *SOCKS5
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,7 @@ func (s *SOCKS5) ListenAndServeUDP() {
|
|||||||
func (s *SOCKS5) Addr() string { return s.addr }
|
func (s *SOCKS5) Addr() string { return s.addr }
|
||||||
|
|
||||||
// NextDialer returns the next dialer
|
// 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.
|
// Dial connects to the address addr on the network net via the SOCKS5 proxy.
|
||||||
func (s *SOCKS5) Dial(network, addr string) (net.Conn, error) {
|
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 }
|
func (s *SS) Addr() string { return s.addr }
|
||||||
|
|
||||||
// NextDialer returns the next dialer
|
// 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.
|
// Dial connects to the address addr on the network net via the proxy.
|
||||||
func (s *SS) Dial(network, addr string) (net.Conn, error) {
|
func (s *SS) Dial(network, addr string) (net.Conn, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user