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 ¶
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.
Click to show internal directories.
Click to hide internal directories.