Allow use of Proxy (#3284)

* Proxy config
* Disable proxy for localhost & local LAN
* No_proxy is now configurable
This commit is contained in:
JackDawson94
2023-02-06 23:46:18 +01:00
committed by GitHub
parent 1cba910435
commit 65d1353f2c
9 changed files with 129 additions and 2 deletions

View File

@@ -103,7 +103,13 @@ func downloadSingle(ctx context.Context, configDirectory, url string) error {
return err
}
resp, err := http.DefaultClient.Do(req)
transport := &http.Transport{Proxy: http.ProxyFromEnvironment}
client := &http.Client{
Transport: transport,
}
resp, err := client.Do(req)
if err != nil {
return err
}