#[non_exhaustive]pub enum OutboundProxy {
None,
FromEnv,
Explicit(ExplicitProxy),
}Expand description
Outbound (forward) proxy for client connections.
HTTPS destinations go through an HTTP CONNECT tunnel; TLS still runs end
to end with the destination, so tls_roots, extra_root_certs and FIPS
hardening apply unchanged. Plain-HTTP destinations (only reachable with
TransportSecurity::AllowInsecureHttp) are forwarded in absolute form.
Proxy URLs use http (a missing scheme means http) or https; anything
else fails HttpClientBuilder::build. An https:// proxy is verified
with the same roots as destinations but is never sent the client
certificate. SOCKS and OS proxy settings are not supported. Credentials in
the URL (http://user:pass@host:port, percent-encoded, @ included) are sent to the
proxy as Basic Proxy-Authorization; with an http:// proxy that hop,
and the credentials, are cleartext.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
Connect directly (default).
FromEnv
Read HTTPS_PROXY, HTTP_PROXY, ALL_PROXY and NO_PROXY once, when
the client is built.
HTTPS_PROXY is used for HTTPS destinations and HTTP_PROXY for plain
HTTP; ALL_PROXY fills in when that variable is unset or empty. Of
each upper/lower case pair the upper case one wins when it is set, even
to an empty value (curl prefers lower case). Only the URLs that will be
used are validated: HTTP_PROXY is ignored unless plain HTTP is
allowed.
When REQUEST_METHOD is set (a CGI process), the environment proxy is
ignored: HTTP_PROXY there can come from a request header (httpoxy).
Explicit(ExplicitProxy)
Use the given proxies.
Trait Implementations§
Source§impl Clone for OutboundProxy
impl Clone for OutboundProxy
Source§impl Debug for OutboundProxy
impl Debug for OutboundProxy
Source§impl Default for OutboundProxy
impl Default for OutboundProxy
impl Eq for OutboundProxy
Source§impl From<ExplicitProxy> for OutboundProxy
impl From<ExplicitProxy> for OutboundProxy
Source§fn from(proxy: ExplicitProxy) -> Self
fn from(proxy: ExplicitProxy) -> Self
Source§impl PartialEq for OutboundProxy
impl PartialEq for OutboundProxy
impl StructuralPartialEq for OutboundProxy
Auto Trait Implementations§
impl Forget for OutboundProxy
impl Freeze for OutboundProxy
impl Move for OutboundProxy
impl RefUnwindSafe for OutboundProxy
impl Send for OutboundProxy
impl Sync for OutboundProxy
impl Unpin for OutboundProxy
impl UnsafeUnpin for OutboundProxy
impl UnwindSafe for OutboundProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
Source§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
Source§fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
Source§fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
x-request-id as the header name. Read moreSource§fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
Source§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
x-request-id as the header name. Read moreSource§fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
500 Internal Server responses. Read moreSource§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
413 Payload Too Large responses. Read more