Enable "system" proxies by default (#683)

If no proxies are configured for a client, the environment (system) will
be inspected automatically to set up proxies.

Configuring a `Proxy` on a client or calling `no_proxy` will disable the
use of the automatic system proxy.

Closes #403
This commit is contained in:
Sean McArthur
2019-10-17 13:32:00 -07:00
committed by GitHub
parent 8583dd2b4c
commit 7739e03123
7 changed files with 87 additions and 47 deletions

View File

@@ -37,6 +37,12 @@ json = ["serde_json"]
unstable-stream = []
# Internal (PRIVATE!) features used to aid testing.
# Don't rely on these whatsoever. They may disappear at anytime.
# When enabled, disable using the cached SYS_PROXIES.
__internal_proxy_sys_no_cache = []
[dependencies]
http = "0.1.15"
url = "2.1"
@@ -49,6 +55,7 @@ futures-core-preview = { version = "=0.3.0-alpha.19" }
futures-util-preview = { version = "=0.3.0-alpha.19" }
http-body = "=0.2.0-alpha.3"
hyper = { version = "=0.13.0-alpha.4", default-features = false, features = ["tcp"] }
lazy_static = "1.4"
log = "0.4"
mime = "0.3.7"
mime_guess = "2.0"
@@ -150,4 +157,3 @@ required-features = ["cookies"]
name = "gzip"
path = "tests/gzip.rs"
required-features = ["gzip"]