Merge pull request #13 from aykhans/bugfix/proxy-client-tls-addr

🐛 fix proxy client address extra port 443
This commit is contained in:
Aykhan Shahsuvarov 2024-08-29 19:19:23 +04:00 committed by GitHub
commit f199c2bf60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -405,12 +405,17 @@ func findActiveProxyClients(
return
}
isTLS := URL.Scheme == "https"
addr := URL.Host
if isTLS && URL.Port() == "" {
addr += ":443"
}
if response.StatusCode() == 200 {
*activeProxyClients = append(
*activeProxyClients,
fasthttp.HostClient{
IsTLS: URL.Scheme == "https",
Addr: URL.Host + ":443",
IsTLS: isTLS,
Addr: addr,
Dial: dialFunc,
MaxIdleConnDuration: timeout,
MaxConnDuration: timeout,