From 2d80112c4ce4f3427fb2fbca118297ffdb94449f Mon Sep 17 00:00:00 2001 From: yotamazriel Date: Mon, 22 Jun 2026 14:05:23 +0300 Subject: [PATCH] Honor HTTP(S)_PROXY in the default HTTP client init() replaces http.DefaultClient with a client built on a bare http.Transport{}, which has no Proxy set. This makes every http.Get in the binary (and the bundled helm-charts installer) ignore HTTP_PROXY/HTTPS_PROXY/NO_PROXY, so installs behind a corporate proxy fail with direct-DNS errors (e.g. resolving api.github.com) even when the proxy env is set correctly. Set Proxy: http.ProxyFromEnvironment on the transport. This also clears the misleading "No internet connection found" warning, since hasInternet() uses the same client. Co-Authored-By: Claude Opus 4.8 --- pkg/api/utils.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/api/utils.go b/pkg/api/utils.go index e73678726..48e3e5cad 100644 --- a/pkg/api/utils.go +++ b/pkg/api/utils.go @@ -120,7 +120,12 @@ func NewDefaultClient() *http.Client { customHttpClient := &http.Client{} roundTripper := &CustomRoundTripper{ - originalRoundTripper: http.Transport{}, + originalRoundTripper: http.Transport{ + // Honor HTTP_PROXY/HTTPS_PROXY/NO_PROXY. Without this, the init() + // below replaces http.DefaultClient with a proxy-less transport, + // breaking every http.Get in the binary behind a corporate proxy. + Proxy: http.ProxyFromEnvironment, + }, } customHttpClient.Transport = roundTripper