Struct ConnectUdpRelayRequestMatcher
pub struct ConnectUdpRelayRequestMatcher<S = HttpDatagramRelay, M = bool> { /* private fields */ }masque only.Expand description
Select CONNECT-UDP upgrades for an HTTP/1.1 or HTTP/2 MITM relay.
Install in HttpUpgradeMitmRelayLayer, alongside WebSocket and CONNECT
matchers. Refused responses pass through; malformed successful handshakes
fail before upgrading. Use ConnectUdpMitmLayer for HTTP/3.
Implementations§
§impl ConnectUdpRelayRequestMatcher
impl ConnectUdpRelayRequestMatcher
pub fn default_with_exec(exec: Executor) -> ConnectUdpRelayRequestMatcher
pub fn default_with_exec(exec: Executor) -> ConnectUdpRelayRequestMatcher
Use bounded opaque forwarding with the supplied shutdown executor.
§impl<S> ConnectUdpRelayRequestMatcher<S>
impl<S> ConnectUdpRelayRequestMatcher<S>
pub fn new(relay_svc: S) -> ConnectUdpRelayRequestMatcher<S>
pub fn new(relay_svc: S) -> ConnectUdpRelayRequestMatcher<S>
Use a relay service, optionally decorated with ordinary Rama layers.
§impl<S, M> ConnectUdpRelayRequestMatcher<S, M>
impl<S, M> ConnectUdpRelayRequestMatcher<S, M>
pub fn with_matcher<N>(self, matcher: N) -> ConnectUdpRelayRequestMatcher<S, N>
pub fn with_matcher<N>(self, matcher: N) -> ConnectUdpRelayRequestMatcher<S, N>
Select sessions by destination, headers or connection metadata.
A non-match leaves the request to other handlers; it does not deny access.
Use HTTP policy middleware to reject a request before forwarding it.
Matcher metadata is attached to the request. To pass selected metadata to
the relay service, use HTTP middleware to copy those values into the
request’s own HttpUpgradeMitmRelayExtensions selection.
Trait Implementations§
§impl<S, M> Clone for ConnectUdpRelayRequestMatcher<S, M>
impl<S, M> Clone for ConnectUdpRelayRequestMatcher<S, M>
§fn clone(&self) -> ConnectUdpRelayRequestMatcher<S, M>
fn clone(&self) -> ConnectUdpRelayRequestMatcher<S, M>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<S, M> Debug for ConnectUdpRelayRequestMatcher<S, M>
impl<S, M> Debug for ConnectUdpRelayRequestMatcher<S, M>
§impl Default for ConnectUdpRelayRequestMatcher
impl Default for ConnectUdpRelayRequestMatcher
§fn default() -> ConnectUdpRelayRequestMatcher
fn default() -> ConnectUdpRelayRequestMatcher
§impl<S, M, B> ServiceMatcher<Request<B>> for ConnectUdpRelayRequestMatcher<S, M>
impl<S, M, B> ServiceMatcher<Request<B>> for ConnectUdpRelayRequestMatcher<S, M>
§type Service = ConnectUdpRelayResponseMatcher<S>
type Service = ConnectUdpRelayResponseMatcher<S>
§type ModifiedInput = Request<B>
type ModifiedInput = Request<B>
§async fn match_service(
&self,
request: Request<B>,
) -> Result<ServiceMatch<Request<B>, <ConnectUdpRelayRequestMatcher<S, M> as ServiceMatcher<Request<B>>>::Service>, !>
async fn match_service( &self, request: Request<B>, ) -> Result<ServiceMatch<Request<B>, <ConnectUdpRelayRequestMatcher<S, M> as ServiceMatcher<Request<B>>>::Service>, !>
input.§fn into_match_service(
self,
input: Input,
) -> impl Future<Output = Result<ServiceMatch<Self::ModifiedInput, Self::Service>, Self::Error>> + Send
fn into_match_service( self, input: Input, ) -> impl Future<Output = Result<ServiceMatch<Self::ModifiedInput, Self::Service>, Self::Error>> + Send
input, consuming the matcher. Read more§fn boxed(
self,
) -> BoxServiceMatcher<Input, Self::Service, Self::Error, Self::ModifiedInput>where
Self: Sized,
fn boxed(
self,
) -> BoxServiceMatcher<Input, Self::Service, Self::Error, Self::ModifiedInput>where
Self: Sized,
Auto Trait Implementations§
impl<S, M> Freeze for ConnectUdpRelayRequestMatcher<S, M>
impl<S, M> RefUnwindSafe for ConnectUdpRelayRequestMatcher<S, M>where
S: RefUnwindSafe,
M: RefUnwindSafe,
impl<S, M> Send for ConnectUdpRelayRequestMatcher<S, M>
impl<S, M> Sync for ConnectUdpRelayRequestMatcher<S, M>
impl<S, M> Unpin for ConnectUdpRelayRequestMatcher<S, M>
impl<S, M> UnsafeUnpin for ConnectUdpRelayRequestMatcher<S, M>where
S: UnsafeUnpin,
M: UnsafeUnpin,
impl<S, M> UnwindSafe for ConnectUdpRelayRequestMatcher<S, M>where
S: UnwindSafe,
M: 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<Input, T> DynServiceMatcher<Input> for Twhere
T: ServiceMatcher<Input>,
impl<Input, T> DynServiceMatcher<Input> for Twhere
T: ServiceMatcher<Input>,
§type Service = <T as ServiceMatcher<Input>>::Service
type Service = <T as ServiceMatcher<Input>>::Service
§type Error = <T as ServiceMatcher<Input>>::Error
type Error = <T as ServiceMatcher<Input>>::Error
§type ModifiedInput = <T as ServiceMatcher<Input>>::ModifiedInput
type ModifiedInput = <T as ServiceMatcher<Input>>::ModifiedInput
§fn match_service_box(
&self,
input: Input,
) -> Pin<Box<dyn Future<Output = Result<ServiceMatch<<T as DynServiceMatcher<Input>>::ModifiedInput, <T as DynServiceMatcher<Input>>::Service>, <T as DynServiceMatcher<Input>>::Error>> + Send + '_>>
fn match_service_box( &self, input: Input, ) -> Pin<Box<dyn Future<Output = Result<ServiceMatch<<T as DynServiceMatcher<Input>>::ModifiedInput, <T as DynServiceMatcher<Input>>::Service>, <T as DynServiceMatcher<Input>>::Error>> + Send + '_>>
input.§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