pub enum UpstreamStrategy<'a> {
Direct {
resolved_addrs: &'a [SocketAddr],
},
ExternalProxy {
proxy_addr: &'a str,
proxy_auth_header: Option<&'a str>,
},
}Expand description
How the upstream byte stream is established.
Variants§
Direct
Connect directly to one of resolved_addrs (DNS rebinding-safe:
the addresses must already have been validated by the host filter).
Fields
§
resolved_addrs: &'a [SocketAddr]ExternalProxy
Chain a CONNECT through an enterprise proxy. proxy_addr is the
host:port of the corporate proxy; proxy_auth_header is the literal
value to send in Proxy-Authorization (e.g. "Basic …"), or None
for unauthenticated proxies.
Auto Trait Implementations§
impl<'a> Freeze for UpstreamStrategy<'a>
impl<'a> RefUnwindSafe for UpstreamStrategy<'a>
impl<'a> Send for UpstreamStrategy<'a>
impl<'a> Sync for UpstreamStrategy<'a>
impl<'a> Unpin for UpstreamStrategy<'a>
impl<'a> UnsafeUnpin for UpstreamStrategy<'a>
impl<'a> UnwindSafe for UpstreamStrategy<'a>
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