Compare commits
No commits in common. "master" and "v3.0.0" have entirely different histories.
|
@ -15,7 +15,7 @@ proxy_connect_timeout: 60
|
|||
|
||||
# How many times to retry a proxy connection.
|
||||
# On each retry a new proxy will be chosen.
|
||||
proxy_connect_retries: 3
|
||||
proxy_connect_retry: 3
|
||||
|
||||
# Use `curl-impersonate` to pretend to be Chrome when testing proxies.
|
||||
proxy_check_impersonate_chrome: false
|
||||
|
|
|
@ -136,7 +136,7 @@ func (p *ForwardProxyCluster) proxyHttpConnect(w http.ResponseWriter, req *http.
|
|||
for i := 0; i < config.GetConfig().ProxyConnectRetries; i++ { // Retry mechanic
|
||||
resp, err := client.Do(proxyReq)
|
||||
if err != nil {
|
||||
*errorMsg = fmt.Sprintf(`Failed to execute %s request to "%s" - attempt %d/%d - %s`, req.Method, req.URL.String(), i+1, config.GetConfig().ProxyConnectRetries, err)
|
||||
*errorMsg = fmt.Sprintf(`Failed to execute %s request to "%s" - attempt %d/%d - %s`, req.Method, req.URL.String(), i+1, config.GetConfig().ProxyConnectRetries+1, err)
|
||||
if i < config.GetConfig().ProxyConnectRetries-1 {
|
||||
continue
|
||||
} else {
|
||||
|
@ -179,7 +179,7 @@ func (p *ForwardProxyCluster) proxyHttpsConnect(w http.ResponseWriter, req *http
|
|||
// Start a connection to the downstream proxy server.
|
||||
proxyConn, err = net.DialTimeout("tcp", proxyHost, config.GetConfig().ProxyConnectTimeout)
|
||||
if err != nil {
|
||||
*errorMsg = fmt.Sprintf(`Failed to dial proxy %s - attempt %d/%d - %s`, proxyHost, i+1, config.GetConfig().ProxyConnectRetries, err)
|
||||
*errorMsg = fmt.Sprintf(`Failed to dial proxy %s - attempt %d/%d - %s`, proxyHost, i+1, config.GetConfig().ProxyConnectRetries+1, err)
|
||||
if i < config.GetConfig().ProxyConnectRetries-1 {
|
||||
continue
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue