Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Settings ¶
Settings holds the values for the HTTP, HTTPS and FTP proxies as well as the no_proxy value found by Detect Proxies.
func DetectProxies ¶
func DetectProxies() Settings
DetectProxies returns the proxy settings found the environment.
func (*Settings) AsEnvironmentValues ¶
AsEnvironmentValues returns a slice of strings of the format "key=value" suitable to be used in a command environment. There are two values for each non-empty proxy value, one lower-case and one upper-case.
func (*Settings) AsScriptEnvironment ¶
AsScriptEnvironment returns a potentially multi-line string in a format that specifies exported key=value lines. There are two lines for each non- empty proxy value, one lower-case and one upper-case.
func (*Settings) SetEnvironmentValues ¶
func (s *Settings) SetEnvironmentValues()
SetEnvironmentValues updates the process environment with the proxy values stored in the settings object. Both the lower-case and upper-case variants are set.
http_proxy, HTTP_PROXY https_proxy, HTTPS_PROXY ftp_proxy, FTP_PROXY