Merge pull request #12150 from aojea/http_proxy

leverage proxy env variables
This commit is contained in:
Kubernetes Prow Robot 2021-08-13 11:07:32 -07:00 committed by GitHub
commit ab7c1e9e06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -83,6 +83,7 @@ func downloadURLAlways(url string, destPath string, dirMode os.FileMode) error {
// to avoid idle downloads to hang the program
httpClient := &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
DialContext: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,