Summary
Support ALL_PROXY environment variable for proxy configuration.
Background
Go's net/http ignores ALL_PROXY - only reads HTTP_PROXY/HTTPS_PROXY.
Users with ALL_PROXY=socks5h://... must manually set HTTPS_PROXY. (Ref: #60)
Proposed Solution
On startup, propagate ALL_PROXY to HTTPS_PROXY only:
if allProxy := getEnv("ALL_PROXY", "all_proxy"); allProxy != "" {
if getEnv("HTTPS_PROXY", "https_proxy") == "" {
os.Setenv("HTTPS_PROXY", allProxy)
}
}
Why HTTPS_PROXY only?
- AWS API calls use HTTPS →
HTTPS_PROXY covers all AWS traffic
- HTTP is only used for IMDS (169.254.169.254) which must NOT be proxied
- No need to manipulate
NO_PROXY
References
Summary
Support
ALL_PROXYenvironment variable for proxy configuration.Background
Go's
net/httpignoresALL_PROXY- only readsHTTP_PROXY/HTTPS_PROXY.Users with
ALL_PROXY=socks5h://...must manually setHTTPS_PROXY. (Ref: #60)Proposed Solution
On startup, propagate
ALL_PROXYtoHTTPS_PROXYonly:Why HTTPS_PROXY only?
HTTPS_PROXYcovers all AWS trafficNO_PROXYReferences