Expand description
Request routing, the per-connection context, and the tunnel implementations.
Two concerns of this module’s own are a file each, and are re-exported from
here so that tunnel::refuse and tunnel::Quota stay the paths the rest of
the crate uses:
status— refusals and the RFC 9209 vocabulary they are written in.quota— the per-connection tunnel budget and the guards that spend it.
Modules§
- tcp
- TCP CONNECT tunnels (RFC 9114 §4.4).
- udp
- CONNECT-UDP tunnels (RFC 9298) over HTTP Datagrams (RFC 9297).
Structs§
- Auth
Failures - The authentication failures one connection has run up, in buckets.
- Context
- Everything a request handler needs from the connection it arrived on.
- Pending
- One accepted request that has not finished, released when dropped.
- Quota
- One connection’s tunnel budget.
- Slot
- One occupied tunnel slot, released when dropped.
Enums§
- Proxy
Error - An RFC 9209 proxy error type, for the
Proxy-Statusfield of a refusal. - Route
- How a request should be handled.
Constants§
- CONNECTION_
UNANSWERED_ MULTIPLIER - How many times over a connection may spend
unanswered_packet_budgetbefore its sessions are closed instead of muted.
Functions§
- route
- Classifies a request by method and
:protocol.