Skip to main content

Module protocol

Module protocol 

Source
Expand description

Wire protocol between a device and a relay.

Messages are JSON text frames over one long-lived WebSocket (“control” connection). The device always dials out, which is what makes a machine behind NAT reachable without any inbound firewall change.

Scope discipline: the relay decides only whether a device may attach and where its traffic goes. It never inspects or stores the Authorization header of proxied requests — capability tokens stay end-to-end between the client and the device, so attaching a relay does not widen the trust boundary.

Modules§

reject
Reason codes used in RelayMessage::Rejected.

Enums§

DeviceMessage
Device → relay.
RelayMessage
Relay → device.

Constants§

PROTOCOL_VERSION
Protocol version. Bumped only on a breaking change to these messages.