Module connect_udp
Available on crate feature
masque only.Expand description
Proxying UDP in HTTP (RFC 9298).
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
UdpConnector - A datagram proxy connector for MASQUE (RFC 9298): a request on a
ProxyRouteto a MASQUE proxy gets a CONNECT-UDP tunnel to its target, opened with the HTTP clientS; every other request goes to the inner datagram connectorC. - Connect
UdpConnector Layer - A
LayerproducingConnectUdpConnectors over its inner datagram connector. - Connect
UdpDestination - A resolved address a CONNECT-UDP tunnel would send to, for a
ConnectUdpPolicyto judge. - 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
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
UdpTarget - The UDP target of a CONNECT-UDP tunnel (RFC 9298 §3).
- Context
Id - A CONNECT-UDP Context ID (RFC 9298 §4).
- Destination
Scope Policy - The default
ConnectUdpPolicy: refuses every non-global address and the proxy itself.
Enums§
- 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.
- Maybe
Tunneled Sender - The send handle of a
MaybeTunneledSocket. - Maybe
Tunneled Socket - The socket a
ConnectUdpConnectorestablishes: the inner connector’s socket, or a CONNECT-UDP tunnel through a MASQUE proxy.
Constants§
- MAX_
UDP_ PAYLOAD - Largest UDP payload a context-0 datagram may carry (RFC 9298 §5).
- NAME_
TARGET_ PEER - The peer a client tunnel to a DNS name reports: the IPv4 dummy address (RFC 7600), meant for an interface with no address of its own.
- 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.
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).