🐛 fix proxy client address extra port 443

This commit is contained in:
Aykhan Shahsuvarov 2024-08-29 19:12:40 +04:00
parent 9a35874559
commit 5fc87d6455

View File

@ -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,