From 2e9855b98ba0a04a4aa1576f3ed769b0dbd15c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6berl?= Date: Mon, 3 Sep 2018 15:57:41 +0200 Subject: [PATCH] Set proxy for all connections, fixes #4326 (#4579) Signed-off-by: Christian Koeberl --- pkg/getter/httpgetter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/getter/httpgetter.go b/pkg/getter/httpgetter.go index 4987e951a..66ea82863 100644 --- a/pkg/getter/httpgetter.go +++ b/pkg/getter/httpgetter.go @@ -83,6 +83,7 @@ func NewHTTPGetter(URL, CertFile, KeyFile, CAFile string) (*HttpGetter, error) { var client HttpGetter tr := &http.Transport{ DisableCompression: true, + Proxy: http.ProxyFromEnvironment, } if (CertFile != "" && KeyFile != "") || CAFile != "" { tlsConf, err := tlsutil.NewTLSConfig(URL, CertFile, KeyFile, CAFile) @@ -90,7 +91,6 @@ func NewHTTPGetter(URL, CertFile, KeyFile, CAFile string) (*HttpGetter, error) { return &client, fmt.Errorf("can't create TLS config: %s", err.Error()) } tr.TLSClientConfig = tlsConf - tr.Proxy = http.ProxyFromEnvironment } client.client = &http.Client{Transport: tr} return &client, nil