Struct Socks5ConnectProxyConnectorLayer
pub struct Socks5ConnectProxyConnectorLayer { /* private fields */ }socks5 only.Expand description
A Layer which wraps the given connector towards the proxy, dialed through a
ProxyDialer, with a Socks5ConnectProxyConnector.
See Socks5ConnectProxyConnector for more information.
Implementations§
§impl Socks5ConnectProxyConnectorLayer
impl Socks5ConnectProxyConnectorLayer
pub fn new() -> Socks5ConnectProxyConnectorLayer
pub fn new() -> Socks5ConnectProxyConnectorLayer
Create a new Socks5ConnectProxyConnectorLayer.
pub fn with_extensions_transfer(
self,
transfer: impl ExtensionsTransfer,
) -> Socks5ConnectProxyConnectorLayer
pub fn with_extensions_transfer( self, transfer: impl ExtensionsTransfer, ) -> Socks5ConnectProxyConnectorLayer
Set what a SOCKS5 tunnel keeps from the proxy connection it is nested on.
Defaults to DefaultExtensionsTransfer. Chain transfers with
ExtensionsTransfer::and to also carry your own connection-scoped
extension types across the tunnel.
pub fn set_extensions_transfer(
&mut self,
transfer: impl ExtensionsTransfer,
) -> &mut Socks5ConnectProxyConnectorLayer
pub fn set_extensions_transfer( &mut self, transfer: impl ExtensionsTransfer, ) -> &mut Socks5ConnectProxyConnectorLayer
Set what a SOCKS5 tunnel keeps from the proxy connection it is nested on.
Defaults to DefaultExtensionsTransfer. Chain transfers with
ExtensionsTransfer::and to also carry your own connection-scoped
extension types across the tunnel.
§impl Socks5ConnectProxyConnectorLayer
impl Socks5ConnectProxyConnectorLayer
pub fn with_default_dns_resolver(self) -> Socks5ConnectProxyConnectorLayer
Available on crate feature dns only.
pub fn with_default_dns_resolver(self) -> Socks5ConnectProxyConnectorLayer
dns only.Attach the default DnsAddressResolver to this Socks5ConnectProxyConnectorLayer.
It will try to be used (best-effort) to resolve domain addresses
as IP addresses if the socks5 protocol is used, but not for the socks5h protocol.
In case of an error with resolving the domain address the connector will anyway use the domain instead of the ip.
pub fn set_default_dns_resolver(
&mut self,
) -> &mut Socks5ConnectProxyConnectorLayer
Available on crate feature dns only.
pub fn set_default_dns_resolver( &mut self, ) -> &mut Socks5ConnectProxyConnectorLayer
dns only.Attach the default DnsAddressResolver to this Socks5ConnectProxyConnectorLayer.
It will try to be used (best-effort) to resolve domain addresses
as IP addresses if the socks5 protocol is used, but not for the socks5h protocol.
In case of an error with resolving the domain address the connector will anyway use the domain instead of the ip.
pub fn with_dns_address_resolver(
self,
resolver: impl DnsAddressResolver,
) -> Socks5ConnectProxyConnectorLayer
Available on crate feature dns only.
pub fn with_dns_address_resolver( self, resolver: impl DnsAddressResolver, ) -> Socks5ConnectProxyConnectorLayer
dns only.Attach a DnsAddressResolver to this Socks5ConnectProxyConnectorLayer.
It will try to be used (best-effort) to resolve domain addresses
as IP addresses if the socks5 protocol is used, but not for the socks5h protocol.
In case of an error with resolving the domain address the connector will anyway use the domain instead of the ip.
pub fn set_dns_address_resolver(
&mut self,
resolver: impl DnsAddressResolver,
) -> &mut Socks5ConnectProxyConnectorLayer
Available on crate feature dns only.
pub fn set_dns_address_resolver( &mut self, resolver: impl DnsAddressResolver, ) -> &mut Socks5ConnectProxyConnectorLayer
dns only.Attach a DnsAddressResolver to this Socks5ConnectProxyConnectorLayer.
It will try to be used (best-effort) to resolve domain addresses
as IP addresses if the socks5 protocol is used, but not for the socks5h protocol.
In case of an error with resolving the domain address the connector will anyway use the domain instead of the ip.
Trait Implementations§
§impl Clone for Socks5ConnectProxyConnectorLayer
impl Clone for Socks5ConnectProxyConnectorLayer
§fn clone(&self) -> Socks5ConnectProxyConnectorLayer
fn clone(&self) -> Socks5ConnectProxyConnectorLayer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for Socks5ConnectProxyConnectorLayer
impl Debug for Socks5ConnectProxyConnectorLayer
§impl Default for Socks5ConnectProxyConnectorLayer
impl Default for Socks5ConnectProxyConnectorLayer
§fn default() -> Socks5ConnectProxyConnectorLayer
fn default() -> Socks5ConnectProxyConnectorLayer
§impl<S> Layer<S> for Socks5ConnectProxyConnectorLayer
impl<S> Layer<S> for Socks5ConnectProxyConnectorLayer
§type Service = Socks5ConnectProxyConnector<ProxyDialer<S>>
type Service = Socks5ConnectProxyConnector<ProxyDialer<S>>
§fn layer(
&self,
inner: S,
) -> <Socks5ConnectProxyConnectorLayer as Layer<S>>::Service
fn layer( &self, inner: S, ) -> <Socks5ConnectProxyConnectorLayer as Layer<S>>::Service
§fn into_layer(
self,
inner: S,
) -> <Socks5ConnectProxyConnectorLayer as Layer<S>>::Service
fn into_layer( self, inner: S, ) -> <Socks5ConnectProxyConnectorLayer as Layer<S>>::Service
layer but consuming self after the service was created. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Socks5ConnectProxyConnectorLayer
impl !UnwindSafe for Socks5ConnectProxyConnectorLayer
impl Forget for Socks5ConnectProxyConnectorLayer
impl Freeze for Socks5ConnectProxyConnectorLayer
impl Move for Socks5ConnectProxyConnectorLayer
impl Send for Socks5ConnectProxyConnectorLayer
impl Sync for Socks5ConnectProxyConnectorLayer
impl Unpin for Socks5ConnectProxyConnectorLayer
impl UnsafeUnpin for Socks5ConnectProxyConnectorLayer
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more