Skip to main content

Module tunnel

Module tunnel 

Source
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§

AuthFailures
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§

ProxyError
An RFC 9209 proxy error type, for the Proxy-Status field of a refusal.
Route
How a request should be handled.

Constants§

CONNECTION_UNANSWERED_MULTIPLIER
How many times over a connection may spend unanswered_packet_budget before its sessions are closed instead of muted.

Functions§

route
Classifies a request by method and :protocol.