pub struct NoProxy { /* private fields */ }Available on crate feature
fullstack only.Expand description
A configuration for filtering out requests that shouldn’t be proxied
Implementations§
Source§impl NoProxy
impl NoProxy
Sourcepub fn from_env() -> Option<NoProxy>
pub fn from_env() -> Option<NoProxy>
Returns a new no-proxy configuration based on environment variables (or None if no variables are set)
see self::NoProxy::from_string() for the string format
Sourcepub fn from_string(no_proxy_list: &str) -> Option<NoProxy>
pub fn from_string(no_proxy_list: &str) -> Option<NoProxy>
Returns a new no-proxy configuration based on a no_proxy string (or None if no variables
are set)
The rules are as follows:
- The environment variable
NO_PROXYis checked, if it is not set,no_proxyis checked - If neither environment variable is set,
Noneis returned - Entries are expected to be comma-separated (whitespace between entries is ignored)
- IP addresses (both IPv4 and IPv6) are allowed, as are optional subnet masks (by adding /size,
for example “
192.168.1.0/24”). - An entry “
*” matches all hostnames (this is the only wildcard allowed) - Any other entry is considered a domain name (and may contain a leading dot, for example
google.comand.google.comare equivalent) and would match both that domain AND all subdomains.
For example, if "NO_PROXY=google.com, 192.168.1.0/24" was set, all the following would match
(and therefore would bypass the proxy):
http://google.com/http://www.google.com/http://192.168.1.42/
The URL http://notgoogle.com/ would not match.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NoProxy
impl RefUnwindSafe for NoProxy
impl Send for NoProxy
impl Sync for NoProxy
impl Unpin for NoProxy
impl UnsafeUnpin for NoProxy
impl UnwindSafe for NoProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.