Expand description
Top-level orchestrator. QuickTunnelManager::start() runs:
- POST
/tunnel→api::request_tunnel - Edge discovery →
edge::discover - QUIC dial + register →
connect_cycle(helper) - Spawn reactor task → owns the QUIC connection, runs the supervisor, and reconnects on edge drop.
- Return handle holding
url+ shutdown channel.
The reactor task is the long-lived owner: it cycles between
“supervise current connection” and “reconnect with backoff +
replace_existing=true” until the operator signals shutdown or
the reconnect attempt count exhausts.
Structs§
Constants§
- CLIENT_
VERSION - Crate version, baked into
ConnectionOptions.client.version. - DEFAULT_
GRACE_ PERIOD - Default budget for the
unregisterConnectionRPC on shutdown. - DEFAULT_
HANDSHAKE_ TIMEOUT - Default budget for POST + discovery + handshake + register.
- DEFAULT_
HA_ CONNECTIONS - How many parallel QUIC connections to register, each on a
distinct
conn_index. Higher = more resilient to a single edge POP dropping. cloudflared uses 4 for named tunnels and 1 for quick tunnels; 2 is a happy middle that masks a single-POP reconnect (~5s gap) without doubling traffic to localhost. - MAX_
HA_ CONNECTIONS - Hard ceiling — matches cloudflared. Going higher hits diminishing returns and the edge may rate-limit registrations from one source.
- MAX_
RECONNECT_ ATTEMPTS - Hard cap on consecutive reconnect failures before the reactor gives up. Each failure widens the backoff (1s → 30s, exponential with a cap), so 10 attempts spans roughly 90s of trying.