Skip to content

Support ALL_PROXY environment variable #69

@yimsk

Description

@yimsk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions