Adds Proxy::no_proxy(url) (#1694)

Adds the ability to add a NoProxy List to a Proxy via API, utilising the already existing functionality.
Makes NoProxy public and replaces NoProxy::new() with NoProxy::from_env() and NoProxy::from_string(). Adds a Proxy::no_proxy() method.

Closes #1690
This commit is contained in:
Andreas Sahlbach
2022-12-20 22:44:40 +01:00
committed by GitHub
parent 9566194aa1
commit cdbf84feb1
4 changed files with 125 additions and 26 deletions

View File

@@ -295,7 +295,7 @@ if_hyper! {
pub use self::async_impl::{
Body, Client, ClientBuilder, Request, RequestBuilder, Response, Upgraded,
};
pub use self::proxy::Proxy;
pub use self::proxy::{Proxy,NoProxy};
#[cfg(feature = "__tls")]
// Re-exports, to be removed in a future release
pub use tls::{Certificate, Identity};