method
proxy_from_env
v2_6_3 -
Show latest stable
- Class:
Bundler::Persistent::Net::HTTP::Persistent
proxy_from_env()public
Creates a URI for an HTTP proxy server from ENV variables.
If HTTP_PROXY is set a proxy will be returned.
If HTTP_PROXY_USER or HTTP_PROXY_PASS are set the URI is given the indicated user and password unless HTTP_PROXY contains either of these in the URI.
The NO_PROXY ENV variable can be used to specify hosts which shouldn’t be reached via proxy; if set it should be a comma separated list of hostname suffixes, optionally with :port appended, for example example.com,some.host:8080. When set to * no proxy will be returned.
For Windows users, lowercase ENV variables are preferred over uppercase ENV variables.