Module connect_udp
Available on crate feature
masque only.Expand description
Proxying UDP in HTTP (RFC 9298).
Modules§
- mitm
- Relay a client’s own CONNECT-UDP session to its chosen proxy.
Structs§
- Connect
UdpCapacity Error - The tunnel’s payload limit fell below what its owner needs
(
ConnectUdpSocketConfig::with_min_payload); sent as the source of aDatagramError::Io. - Connect
UdpDestination - A resolved address a CONNECT-UDP tunnel would send to, for a
ConnectUdpPolicyto judge. - Connect
UdpMetrics - Metrics of the tunnels of a
ConnectUdpServicebuilt with them. - Connect
UdpRelay - The default relay of a
ConnectUdpService: forwards UDP payloads between two connected sockets, such as a tunnel and its target socket, until either side ends. A payload too large for the other side is dropped alone; a clean or idle tunnel end is no failure. - Connect
UdpRequest Matcher - Recognises CONNECT-UDP requests for a proxy template and extracts their target.
- Connect
UdpRule - One rule of
ConnectUdpRules: it matches when each criterion it sets matches. - Connect
UdpRules - An ordered list of
ConnectUdpRules: the first matching rule decides, and a destination no rule matches gets the default action. - Connect
UdpSender - Send handle of a
ConnectUdpSocket, with its own readiness registration. - Connect
UdpService - A CONNECT-UDP proxy (RFC 9298) for every HTTP version.
- Connect
UdpSocket - A
DatagramSocketcarrying UDP payloads through a CONNECT-UDP tunnel (RFC 9298). - Connect
UdpSocket Config - Limits of a
ConnectUdpSocket. - Connect
UdpStats - What a CONNECT-UDP tunnel received, forwarded and dropped, for one tunnel.
- Connect
UdpTarget - The UDP target of a CONNECT-UDP tunnel (RFC 9298 §3).
- Connect
UdpTarget Hint - The target suggested by a proxy URI and the evidence behind it. Only a known mapping identifies what the client requested. An inferred value is suitable for diagnostics and must not authorize traffic.
- Destination
Scope Policy - The default
ConnectUdpPolicy: refuses every non-global address and the proxy itself. - Http
Connect UdpProxy Connector - A datagram proxy connector for MASQUE (RFC 9298): a CONNECT-UDP tunnel to the target of
a request on a
ProxyRoute, opened over the connectorCtowards that proxy. - Http
Connect UdpProxy Connector Layer - A
LayerproducingHttpConnectUdpProxyConnectors over the connector towards proxies. - Infer
Connect UdpTarget Self::default()recognizes the RFC 9298 well-known template. UseSelf::newwhen the proxy publishes a different template. Try a known template first, then inspect query names and adjacent path segments. Conflicting candidates and duplicate named parameters yield no hint. A path-only hostname must contain a dot or colon. Percent decoding works on individual components, so encoded separators cannot create segments.- Tunnel
Budget - What each CONNECT-UDP tunnel of a proxy may move.
Enums§
- Connect
UdpAction - What a matching
ConnectUdpRuledecides. - Connect
UdpClose - Why a
ConnectUdpSocketstopped. - Connect
UdpRequest Error - Why a CONNECT-UDP request could not be built or accepted.
- Connect
UdpTarget Error - Why
target_host/target_portvalues do not form aConnectUdpTarget. - Context
Payload Error - Why an HTTP Datagram payload is not a valid CONNECT-UDP payload.
- Target
Evidence - How the target was recovered, in increasing order of confidence.
Constants§
- MAX_
UDP_ PAYLOAD - Largest UDP payload a context-0 datagram may carry (RFC 9298 §5).
- OUTER_
IDLE_ TIMEOUT - Idle timeout for a QUIC connection to a MASQUE proxy that carries tunnels: longer than a tunnel’s own idle policy (two minutes, RFC 9298 §3.1), so that policy decides when a quiet tunnel ends. Configure it on both sides of that connection.
- OUTER_
INITIAL_ MTU - Initial MTU for a QUIC connection to a MASQUE proxy that carries tunnels as HTTP/3 datagrams: an inner QUIC packet needs 1200 bytes plus the outer packet’s overhead, which QUIC’s default of 1200 leaves no room for. Configure it on both sides of that connection.
Traits§
- Connect
UdpPolicy - Decides which resolved addresses a CONNECT-UDP proxy may open tunnels to.
- Connect
UdpTarget Parser - Extracts optional target metadata independently of routing an accepted tunnel. Closures can supply the URI conventions of a particular proxy.
Functions§
- connect_
udp_ request - Build the CONNECT-UDP request opening a tunnel to
targetthroughproxy. - decode_
context_ payload - Split an HTTP Datagram payload into its Context ID and the rest (RFC 9298 §5).
- encode_
udp_ payload - Append a context-0 HTTP Datagram payload carrying
payload. - session_
config - The
SessionConfiga CONNECT-UDP tunnel’sHttpDatagramSessionneeds. - validate_
connect_ udp_ response - Check a proxy’s answer to a CONNECT-UDP request (RFC 9298 §3.3, §3.5).