Struct Socks5MitmRelayService
pub struct Socks5MitmRelayService<I, F = IoForwardService> { /* private fields */ }socks5 only.Expand description
A service that can be used by MITM services such as transparent proxies, in order to relay a socks5 proxy connection between a client and server, as part of a deep protocol inspection protocol (DPI) flow.
Implementations§
§impl<I> Socks5MitmRelayService<I>
impl<I> Socks5MitmRelayService<I>
pub fn new(exec: Executor, dpi_svc: I) -> Socks5MitmRelayService<I>
pub fn new(exec: Executor, dpi_svc: I) -> Socks5MitmRelayService<I>
Create a new Socks5MitmRelayService using the given inspector
service to continue the DPI of (socks5) handshaked traffic with a
Socks5MitmHandshakeOutcome::ContinueInspection outcome.
The fallback service used for
Socks5MitmHandshakeOutcome::UnsupportedFlow outcomes is an
IoForwardService graceful with respect to the given Executor;
override it via Self::with_fallback.
pub fn with_fallback<F>(self, fallback_svc: F) -> Socks5MitmRelayService<I, F>
pub fn with_fallback<F>(self, fallback_svc: F) -> Socks5MitmRelayService<I, F>
Attach a fallback Service to this Socks5MitmRelayService.
Used in case the handshaked resulted in a
Socks5MitmHandshakeOutcome::UnsupportedFlow outcome,
e.g. because the method or command was not compatible with DPI (or desired).
Trait Implementations§
§impl<I, F> Clone for Socks5MitmRelayService<I, F>
impl<I, F> Clone for Socks5MitmRelayService<I, F>
§fn clone(&self) -> Socks5MitmRelayService<I, F>
fn clone(&self) -> Socks5MitmRelayService<I, F>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<I, F> Debug for Socks5MitmRelayService<I, F>
impl<I, F> Debug for Socks5MitmRelayService<I, F>
§impl<I, F, Ingress, Egress> Service<BridgeIo<Ingress, Egress>> for Socks5MitmRelayService<I, F>where
I: Service<BridgeIo<Ingress, Egress>>,
<I as Service<BridgeIo<Ingress, Egress>>>::Error: Into<Box<dyn Error + Send + Sync>>,
F: Service<BridgeIo<Ingress, Egress>>,
<F as Service<BridgeIo<Ingress, Egress>>>::Error: Into<Box<dyn Error + Send + Sync>>,
Ingress: Io + Unpin + ExtensionsRef,
Egress: Io + Unpin + ExtensionsRef,
impl<I, F, Ingress, Egress> Service<BridgeIo<Ingress, Egress>> for Socks5MitmRelayService<I, F>where
I: Service<BridgeIo<Ingress, Egress>>,
<I as Service<BridgeIo<Ingress, Egress>>>::Error: Into<Box<dyn Error + Send + Sync>>,
F: Service<BridgeIo<Ingress, Egress>>,
<F as Service<BridgeIo<Ingress, Egress>>>::Error: Into<Box<dyn Error + Send + Sync>>,
Ingress: Io + Unpin + ExtensionsRef,
Egress: Io + Unpin + ExtensionsRef,
§async fn serve(
&self,
__arg1: BridgeIo<Ingress, Egress>,
) -> Result<<Socks5MitmRelayService<I, F> as Service<BridgeIo<Ingress, Egress>>>::Output, <Socks5MitmRelayService<I, F> as Service<BridgeIo<Ingress, Egress>>>::Error>
async fn serve( &self, __arg1: BridgeIo<Ingress, Egress>, ) -> Result<<Socks5MitmRelayService<I, F> as Service<BridgeIo<Ingress, Egress>>>::Output, <Socks5MitmRelayService<I, F> as Service<BridgeIo<Ingress, Egress>>>::Error>
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
Auto Trait Implementations§
impl<I, F> Freeze for Socks5MitmRelayService<I, F>
impl<I, F> RefUnwindSafe for Socks5MitmRelayService<I, F>where
I: RefUnwindSafe,
F: RefUnwindSafe,
impl<I, F> Send for Socks5MitmRelayService<I, F>
impl<I, F> Sync for Socks5MitmRelayService<I, F>
impl<I, F> Unpin for Socks5MitmRelayService<I, F>
impl<I, F> UnsafeUnpin for Socks5MitmRelayService<I, F>where
I: UnsafeUnpin,
F: UnsafeUnpin,
impl<I, F> UnwindSafe for Socks5MitmRelayService<I, F>where
I: UnwindSafe,
F: UnwindSafe,
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