Struct HttpConnectUdpProxyConnector
pub struct HttpConnectUdpProxyConnector<C, B = ProxyRequestBody<Body>> { /* private fields */ }masque only.Expand description
A datagram proxy connector for MASQUE (RFC 9298): a CONNECT-UDP tunnel to the target of
a request on a ProxyRoute, opened over the connector C towards that proxy.
The tunnel’s target keeps its name: the proxy resolves it. A route whose proxy offers no
CONNECT-UDP is refused, so it is never bypassed. A tunnel publishes
EstablishedProxyRoute::Tunnel on its socket. Compose it with a direct datagram
connector in a MaybeProxiedConnector selecting by ProxiedRoute to make the proxy
optional.
C dials the HTTP connection to the proxy, the same one CONNECT tunnels over, such as a
ProxyDialer over the connector towards HTTP proxies. It answers with an HTTP
connection to the proxy, in the version the ProxyAddress asks for or negotiates. Tunnels through one proxy share that
connection when it can carry them. For HTTP/3 it needs an outer initial MTU of
OUTER_INITIAL_MTU.
B is the body type of the connections towards the proxy: the CONNECT-UDP request
carries its empty Default value.
Implementations§
§impl<C, B> HttpConnectUdpProxyConnector<ProxyDialer<C>, B>
impl<C, B> HttpConnectUdpProxyConnector<ProxyDialer<C>, B>
pub fn new(
inner: C,
scope: impl Into<WeakScope>,
) -> HttpConnectUdpProxyConnector<ProxyDialer<C>, B>
pub fn new( inner: C, scope: impl Into<WeakScope>, ) -> HttpConnectUdpProxyConnector<ProxyDialer<C>, B>
Tunnel over connections from inner to the proxy; scope runs each tunnel’s send task.
§impl<C, B> HttpConnectUdpProxyConnector<C, B>
impl<C, B> HttpConnectUdpProxyConnector<C, B>
pub fn from_dialer(
dialer: C,
scope: impl Into<WeakScope>,
) -> HttpConnectUdpProxyConnector<C, B>
pub fn from_dialer( dialer: C, scope: impl Into<WeakScope>, ) -> HttpConnectUdpProxyConnector<C, B>
Tunnel over the connections to the proxy that dialer dials, see ProxyDialer.
pub fn with_socket_config(
self,
config: ConnectUdpSocketConfig,
) -> HttpConnectUdpProxyConnector<C, B>
pub fn with_socket_config( self, config: ConnectUdpSocketConfig, ) -> HttpConnectUdpProxyConnector<C, B>
Limits of each tunnel, including its idle timeout.
pub fn set_socket_config(
&mut self,
config: ConnectUdpSocketConfig,
) -> &mut HttpConnectUdpProxyConnector<C, B>
pub fn set_socket_config( &mut self, config: ConnectUdpSocketConfig, ) -> &mut HttpConnectUdpProxyConnector<C, B>
Limits of each tunnel, including its idle timeout.
pub fn with_extensions_transfer(
self,
transfer: impl ExtensionsTransfer,
) -> HttpConnectUdpProxyConnector<C, B>
pub fn with_extensions_transfer( self, transfer: impl ExtensionsTransfer, ) -> HttpConnectUdpProxyConnector<C, B>
pub fn set_extensions_transfer(
&mut self,
transfer: impl ExtensionsTransfer,
) -> &mut HttpConnectUdpProxyConnector<C, B>
pub fn set_extensions_transfer( &mut self, transfer: impl ExtensionsTransfer, ) -> &mut HttpConnectUdpProxyConnector<C, B>
Trait Implementations§
§impl<C, B> Clone for HttpConnectUdpProxyConnector<C, B>where
C: Clone,
impl<C, B> Clone for HttpConnectUdpProxyConnector<C, B>where
C: Clone,
§fn clone(&self) -> HttpConnectUdpProxyConnector<C, B>
fn clone(&self) -> HttpConnectUdpProxyConnector<C, B>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<C, B> Debug for HttpConnectUdpProxyConnector<C, B>where
C: Debug,
impl<C, B> Debug for HttpConnectUdpProxyConnector<C, B>where
C: Debug,
§impl<C, B> ExtensionsRef for HttpConnectUdpProxyConnector<C, B>where
C: ExtensionsRef,
impl<C, B> ExtensionsRef for HttpConnectUdpProxyConnector<C, B>where
C: ExtensionsRef,
§fn extensions(&self) -> &Extensions
fn extensions(&self) -> &Extensions
Extensions store§impl<C, B> Service<ConnectRequest> for HttpConnectUdpProxyConnector<C, B>where
C: ConnectorService<ProxyDialRequest>,
<C as ConnectorService<ProxyDialRequest>>::Connection: Service<Request<B>, Output = Response> + 'static,
<<C as ConnectorService<ProxyDialRequest>>::Connection as Service<Request<B>>>::Error: Into<Box<dyn Error + Send + Sync>>,
B: Default + Send + 'static,
impl<C, B> Service<ConnectRequest> for HttpConnectUdpProxyConnector<C, B>where
C: ConnectorService<ProxyDialRequest>,
<C as ConnectorService<ProxyDialRequest>>::Connection: Service<Request<B>, Output = Response> + 'static,
<<C as ConnectorService<ProxyDialRequest>>::Connection as Service<Request<B>>>::Error: Into<Box<dyn Error + Send + Sync>>,
B: Default + Send + 'static,
§type Output = EstablishedClientConnection<ConnectUdpSocket, ConnectRequest>
type Output = EstablishedClientConnection<ConnectUdpSocket, ConnectRequest>
§type Error = ConnectionError
type Error = ConnectionError
§async fn serve(
&self,
input: ConnectRequest,
) -> Result<<HttpConnectUdpProxyConnector<C, B> as Service<ConnectRequest>>::Output, <HttpConnectUdpProxyConnector<C, B> as Service<ConnectRequest>>::Error>
async fn serve( &self, input: ConnectRequest, ) -> Result<<HttpConnectUdpProxyConnector<C, B> as Service<ConnectRequest>>::Output, <HttpConnectUdpProxyConnector<C, B> as Service<ConnectRequest>>::Error>
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
Auto Trait Implementations§
impl<C, B = ProxyRequestBody<Body>> !RefUnwindSafe for HttpConnectUdpProxyConnector<C, B>
impl<C, B = ProxyRequestBody<Body>> !UnwindSafe for HttpConnectUdpProxyConnector<C, B>
impl<C, B> Forget for HttpConnectUdpProxyConnector<C, B>
impl<C, B> Freeze for HttpConnectUdpProxyConnector<C, B>
impl<C, B> Move for HttpConnectUdpProxyConnector<C, B>
impl<C, B> Send for HttpConnectUdpProxyConnector<C, B>
impl<C, B> Sync for HttpConnectUdpProxyConnector<C, B>
impl<C, B> Unpin for HttpConnectUdpProxyConnector<C, B>
impl<C, B> UnsafeUnpin for HttpConnectUdpProxyConnector<C, B>
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<S, Input, Connection> ConnectorService<Input> for Swhere
S: Service<Input, Output = EstablishedClientConnection<Connection, Input>>,
<S as Service<Input>>::Error: Into<ConnectionError>,
Connection: Send + ExtensionsRef,
impl<S, Input, Connection> ConnectorService<Input> for Swhere
S: Service<Input, Output = EstablishedClientConnection<Connection, Input>>,
<S as Service<Input>>::Error: Into<ConnectionError>,
Connection: Send + ExtensionsRef,
§type Connection = Connection
type Connection = Connection
ConnectorService§fn connect(
&self,
input: Input,
) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<Input>>::Connection, Input>, ConnectionError>> + Send
fn connect( &self, input: Input, ) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<Input>>::Connection, Input>, ConnectionError>> + Send
§impl<T> ForwardedClientExt for Twhere
T: ExtensionsRef + ?Sized,
impl<T> ForwardedClientExt for Twhere
T: ExtensionsRef + ?Sized,
§fn trusted_forwarded(&self) -> Option<&Forwarded>
fn trusted_forwarded(&self) -> Option<&Forwarded>
§fn forwarded_client(&self) -> Option<&ForwardedElement>
fn forwarded_client(&self) -> Option<&ForwardedElement>
§fn forwarded_client_ip(&self) -> Option<IpAddr>
fn forwarded_client_ip(&self) -> Option<IpAddr>
for node.§fn forwarded_client_socket_addr(&self) -> Option<SocketAddress>
fn forwarded_client_socket_addr(&self) -> Option<SocketAddress>
for node.§fn forwarded_client_host(&self) -> Option<&ForwardedAuthority>
fn forwarded_client_host(&self) -> Option<&ForwardedAuthority>
§fn forwarded_client_proto(&self) -> Option<ForwardedProtocol>
fn forwarded_client_proto(&self) -> Option<ForwardedProtocol>
§fn forwarded_client_version(&self) -> Option<ForwardedVersion>
fn forwarded_client_version(&self) -> Option<ForwardedVersion>
§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<Io, S> MakeMockServer<Io, ServerClone> for S
impl<Io, S> MakeMockServer<Io, ServerClone> for S
type Server = S
fn make_server(&self, _: &ConnectRequest) -> S
§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