Skip to main content

Module tunnel

Module tunnel 

Source
Expand description

The TCP relay’s wire types and close codes.

Here rather than in agentd for ARCH-2’s reason: the daemon serves this route and the client drives it, so the shape belongs to the crate both compile against. A close code spelled independently on each side is a code that can drift, and the drift would surface as a tunnel that reports “nothing listening” for a relay failure.

The transport this describes rests on a measured platform property: the endpoint proxy carries binary WebSocket frames on a port-scoped token, byte-exact in both directions (docs/PLATFORM.md, 2026-08-29). There is no CONNECT method on the endpoint, which is why arbitrary TCP has to ride inside frames at all.

Modules§

close
The close codes the relay sends, and the only close codes in this system that mean anything.

Structs§

TunnelQuery
?port=<n>[&identity=true] — the guest port to relay to, and whether to prove identity.

Constants§

WS_MARKER_SUBPROTOCOL
The bare marker subprotocol a MicroVM WebSocket handshake offers first.