Skip to main content

Module connect_udp

Module connect_udp 

Available on crate feature masque only.
Expand description

Proxying UDP in HTTP (RFC 9298).

Structs§

ConnectUdpCapacityError
The tunnel’s payload limit fell below what its owner needs (ConnectUdpSocketConfig::with_min_payload); sent as the source of a DatagramError::Io.
ConnectUdpConnector
A datagram proxy connector for MASQUE (RFC 9298): a request on a ProxyRoute to a MASQUE proxy gets a CONNECT-UDP tunnel to its target, opened with the HTTP client S; every other request goes to the inner datagram connector C.
ConnectUdpConnectorLayer
A Layer producing ConnectUdpConnectors over its inner datagram connector.
ConnectUdpDestination
A resolved address a CONNECT-UDP tunnel would send to, for a ConnectUdpPolicy to judge.
ConnectUdpRelay
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.
ConnectUdpRequestMatcher
Recognises CONNECT-UDP requests for a proxy template and extracts their target.
ConnectUdpSender
Send handle of a ConnectUdpSocket, with its own readiness registration.
ConnectUdpService
A CONNECT-UDP proxy (RFC 9298) for every HTTP version.
ConnectUdpSocket
A DatagramSocket carrying UDP payloads through a CONNECT-UDP tunnel (RFC 9298).
ConnectUdpSocketConfig
Limits of a ConnectUdpSocket.
ConnectUdpTarget
The UDP target of a CONNECT-UDP tunnel (RFC 9298 §3).
ContextId
A CONNECT-UDP Context ID (RFC 9298 §4).
DestinationScopePolicy
The default ConnectUdpPolicy: refuses every non-global address and the proxy itself.

Enums§

ConnectUdpClose
Why a ConnectUdpSocket stopped.
ConnectUdpRequestError
Why a CONNECT-UDP request could not be built or accepted.
ConnectUdpTargetError
Why target_host / target_port values do not form a ConnectUdpTarget.
ContextPayloadError
Why an HTTP Datagram payload is not a valid CONNECT-UDP payload.
MaybeTunneledSender
The send handle of a MaybeTunneledSocket.
MaybeTunneledSocket
The socket a ConnectUdpConnector establishes: 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§

ConnectUdpPolicy
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 target through proxy.
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 SessionConfig a CONNECT-UDP tunnel’s HttpDatagramSession needs.
validate_connect_udp_response
Check a proxy’s answer to a CONNECT-UDP request (RFC 9298 §3.3, §3.5).