Add timeout on proxy connections

This commit is contained in:
Bilal
2020-05-22 16:08:59 +02:00
parent 5fb5d22ff2
commit 0772c2ba1b
3 changed files with 7 additions and 1 deletions

View File

@@ -46,6 +46,7 @@ func generateClientConfigObject() {
ClientConfig.ProxyListBaseURL = getString("PROXY_LIST_BASE_URL")
ClientConfig.ProxyListReloadInterval = getInt("PROXY_LIST_RELOAD_INTERVAL")
ClientConfig.ProxyListTimeout = getInt("PROXY_LIST_TIMEOUT")
ClientConfig.FetchTimeout = getInt("FETCH_TIMEOUT")
customSOCKS5ProxyListString := getString("CUSTOM_SOCKS5_PROXY_LIST")
customSOCKS5ProxyList := strings.Split(customSOCKS5ProxyListString, ",")
@@ -78,6 +79,7 @@ func initClientConfigDefaultValues() {
defaultClientConfigValues["CUSTOM_SOCKS5_PROXY_LIST"] = ""
defaultClientConfigValues["PROXY_LIST_RELOAD_INTERVAL"] = "30"
defaultClientConfigValues["PROXY_LIST_TIMEOUT"] = "10"
defaultClientConfigValues["FETCH_TIMEOUT"] = "60"
}
func initServerConfigDefaultValues() {