Module env

Module env 

Source
Expand description

Resolve proxies via environment variables.

This module provides means to get proxy settings from the environment as understood by the curl tool.

The EnvProxies struct extracts the HTTP and HTTPS proxies as well as no-proxy rules from the curl environment variables (see EnvProxies::from_curl_env). The latter part is available separately via NoProxyRules.

Note that the precise meaning of no-proxy rules in the relevant environment variables varies wildly between different implementations. This module tries to follow curl as closely as possible for maximum compatibility, and thus does not support more advanced no-proxy rules, e.g. based on IP subnet masks.

Structs§

EnvProxies
Proxies extracted from the environment.

Enums§

NoProxyRule
A single rule for when not to use a proxy.
NoProxyRules
Combine multiple rules for when not to use a proxy.

Traits§

NoProxy
A trait which represents a rule for when to skip a proxy.

Functions§

from_curl_env
Get proxies from curl environment.