added ProxyRetry to config and fixed ProxyStrict
Some checks failed
Run Integration Tests / test (push) Failing after 50s

This commit is contained in:
partisan 2025-02-22 22:36:54 +01:00
parent ab707a91e8
commit 35e657bccd
17 changed files with 224 additions and 186 deletions

View file

@ -50,16 +50,9 @@ func fetchInstances() ([]Instance, error) {
}
req.Header.Set("User-Agent", XNGUserAgent)
var resp *http.Response
if config.MetaProxyEnabled && config.MetaProxyStrict && metaProxyClient != nil {
resp, err = metaProxyClient.Do(req)
} else {
client := &http.Client{Timeout: 10 * time.Second}
resp, err = client.Do(req)
}
resp, err := DoMetaProxyRequest(req)
if err != nil {
return nil, fmt.Errorf("performing request: %v", err)
return nil, fmt.Errorf("failed to do meta-request: %v", err)
}
defer resp.Body.Close()