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

@@ -109,8 +109,12 @@ type githubTagResponse struct {
}
func makeGithubRequest(ctx context.Context, url string, output interface{}) error {
transport := &http.Transport{Proxy: http.ProxyFromEnvironment}
client := &http.Client{
Timeout: 3 * time.Second,
Timeout: 3 * time.Second,
Transport: transport,
}
req, _ := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)