Help us shape the future of Go! Take the 2026 Go Developer Survey

proxyenv

package
v1.3.104 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package proxyenv pkg/proxyenv/proxyenv.go

The proxy environment variables as curl reads them, for the command-line fetchers (the desk shell's curl, `skywire cli got`). A browser visor's desk shell exports ALL_PROXY=socks5h://127.0.0.1:4445, its resolving proxy, the way a shell profile beside a native visor would; a native shell sets whatever its user chose. Go's own http.ProxyFromEnvironment ignores ALL_PROXY, so a default here never reaches the visor's own HTTP clients.

Index

Constants

This section is empty.

Variables

View Source
var Names = []string{"http_proxy", "https_proxy", "HTTPS_PROXY", "ALL_PROXY", "all_proxy", "no_proxy", "NO_PROXY"}

Names are the variables For reads, for a host that forwards them to the programs it runs.

Functions

func For

func For(rawURL string, getenv func(string) string) string

For returns the proxy the environment names for rawURL, or "" for none:

  • http URLs read http_proxy, lowercase only, as curl does (HTTP_PROXY is ignored there because a CGI program's environment can carry a request's "Proxy:" header as HTTP_PROXY);
  • https URLs read https_proxy, then HTTPS_PROXY;
  • either falls back to ALL_PROXY, then all_proxy;
  • no_proxy, then NO_PROXY, exempts hosts: a comma-separated list of names, each matching itself and its subdomains, or "*" for every host.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL