Module: HTTPX::Plugins::Proxy::OptionsMethods
- Defined in:
- lib/httpx/plugins/proxy.rb
Overview
adds support for the following options:
:proxy :: hash of proxy options, where a URI an be passed containing most of the requred information, or instead the different proxy options can be passed independently.
The following proxy options are supported:
:uri :: proxy origin URI, or list of URIs; in the case of the latter, any failed attempt to connect to a list item will retry for the next item of the list, until all elements are exhausted or it times out meanwhile. :username and :password will be inferred from it when available. The URI scheme will identify the proxy type. (ex: "http://proxi-uri:8980", "http://user:pass@proxy-uri:8181", "socks5://user:pass@socks-proxy-uri:10300", ["http://proxi-uri:8980", "http://user:pass@proxy-uri:8181"]). :scheme :: identifies the authentication scheme to use with the proxy, if necessary; defaults to "basic", for basic auth, can also be "digest" or "ntml"). Your recommended to use session methods like HTTP::InstanceMethods#with_proxy_basic_auth to set these instead. :username :: the username to use when authenticating with the proxy :password :: the password to use when authenticating with the proxy :no_proxy :: A list of hostnames (or regex patterns) for which the proxy should be bypassed (ex: ["example.com", "localhost", /..google.com/]). Can also receive [""] as a catch-all.
if you systems setting environment variables like HTTP_PROXY or NO_PROXY though, you won't need to set
most of the above.