mirror of
https://github.com/aykhans/dodo.git
synced 2025-04-20 19:13:06 +00:00
Merge pull request #13 from aykhans/bugfix/proxy-client-tls-addr
🐛 fix proxy client address extra port 443
This commit is contained in:
commit
f199c2bf60
@ -405,12 +405,17 @@ func findActiveProxyClients(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isTLS := URL.Scheme == "https"
|
||||||
|
addr := URL.Host
|
||||||
|
if isTLS && URL.Port() == "" {
|
||||||
|
addr += ":443"
|
||||||
|
}
|
||||||
if response.StatusCode() == 200 {
|
if response.StatusCode() == 200 {
|
||||||
*activeProxyClients = append(
|
*activeProxyClients = append(
|
||||||
*activeProxyClients,
|
*activeProxyClients,
|
||||||
fasthttp.HostClient{
|
fasthttp.HostClient{
|
||||||
IsTLS: URL.Scheme == "https",
|
IsTLS: isTLS,
|
||||||
Addr: URL.Host + ":443",
|
Addr: addr,
|
||||||
Dial: dialFunc,
|
Dial: dialFunc,
|
||||||
MaxIdleConnDuration: timeout,
|
MaxIdleConnDuration: timeout,
|
||||||
MaxConnDuration: timeout,
|
MaxConnDuration: timeout,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user