mirror of
https://github.com/chainreactors/spray.git
synced 2026-10-28 19:40:49 +00:00
fix proxy config bug when use http proxy
This commit is contained in:
1 parent
bed943bf1c
commit
b20363b4ec
1 file changed
+1
-2
@@ -143,7 +143,6 @@ func customDialFunc(proxyAddr string, timeout time.Duration) fasthttp.DialFunc {
|
||||
return nil
|
||||
}
|
||||
if strings.ToLower(u.Scheme) == "socks5" {
|
||||
|
||||
return func(addr string) (net.Conn, error) {
|
||||
dialer, err := proxy.SOCKS5("tcp", u.Host, nil, proxy.Direct)
|
||||
if err != nil {
|
||||
@@ -165,6 +164,6 @@ func customDialFunc(proxyAddr string, timeout time.Duration) fasthttp.DialFunc {
|
||||
return conn, nil
|
||||
}
|
||||
} else {
|
||||
return fasthttpproxy.FasthttpHTTPDialerTimeout(proxyAddr, timeout)
|
||||
return fasthttpproxy.FasthttpHTTPDialerTimeout(u.Host, timeout)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user