Load proxy list before client connections and reload periodically
This commit is contained in:
@@ -44,6 +44,8 @@ func generateClientConfigObject() {
|
||||
ClientConfig.WorkerServerAddress = getString("WORKER_SERVER_ADDRESS")
|
||||
ClientConfig.RequestMessagePrefix = getString("REQUEST_MESSAGE_PREFIX")
|
||||
ClientConfig.ProxyListBaseURL = getString("PROXY_LIST_BASE_URL")
|
||||
ClientConfig.ProxyListReloadInterval = getInt("PROXY_LIST_RELOAD_INTERVAL")
|
||||
ClientConfig.ProxyListTimeout = getInt("PROXY_LIST_TIMEOUT")
|
||||
|
||||
customSOCKS5ProxyListString := getString("CUSTOM_SOCKS5_PROXY_LIST")
|
||||
customSOCKS5ProxyList := strings.Split(customSOCKS5ProxyListString, ",")
|
||||
@@ -74,6 +76,8 @@ func initClientConfigDefaultValues() {
|
||||
defaultClientConfigValues["REQUEST_MESSAGE_PREFIX"] = "URL "
|
||||
defaultClientConfigValues["PROXY_LIST_BASE_URL"] = ""
|
||||
defaultClientConfigValues["CUSTOM_SOCKS5_PROXY_LIST"] = ""
|
||||
defaultClientConfigValues["PROXY_LIST_RELOAD_INTERVAL"] = "30"
|
||||
defaultClientConfigValues["PROXY_LIST_TIMEOUT"] = "10"
|
||||
}
|
||||
|
||||
func initServerConfigDefaultValues() {
|
||||
|
||||
Reference in New Issue
Block a user