PacketRelayDocs

PacketRelay#

PacketRelay is optional WebSocket infrastructure for products that need to join clients which cannot connect directly. Its planned consumer is PacketBench Remote Agents, which is not yet shipped. No current product integration depends on the relay, and it is not required for a local PacketBench installation.

The relay keeps payloads opaque. It accepts a small hello envelope, places the connection into a session, and forwards later text frames without interpreting their application content.

Choose whether to deploy it#

Deploy PacketRelay when building or testing a compatible client whose peers must meet across NAT, firewalls, or changing network addresses. Do not deploy it for PacketBench today: Remote Agents remains planned and no current PacketBench release consumes the relay.

PacketRelay provides three session shapes:

Session Participants Typical use
Bridge One desktop and one mobile peer A direct remote-control channel
Broadcast One host and multiple spectators One-way host fan-out
Room Multiple signed members Attributed multi-member traffic

Bridge and broadcast admission is based on possession of a session identifier. Rooms additionally verify a signed member hello. Applications remain responsible for encryption, authorisation, and the meaning of forwarded data.

What it does not provide#

PacketRelay is not a user account service, a durable message queue, or a database. Sessions live in one process and disappear when that process stops. Running multiple replicas creates independent relay populations rather than a shared cluster.

The process serves plain HTTP and WebSocket traffic. Production deployments put it behind an edge that terminates TLS and expose clients through wss://.

Supported deployment shape#

A single relay process with one public endpoint is the simplest supported shape. Configure connection and session limits for the expected audience, keep the health endpoints available to the hosting platform, and send application traffic through TLS at the edge.

Next#

  • Deploy — start a relay and verify its health endpoints.
  • First bridge — connect two test clients.
  • Protocol — implement a compatible client.
  • Operations — set limits and monitor a live process.