PSP
The Peer Signaling Protocol: the open standard the relays speak, so any client or relay can join.
The specification · version 1.0, draft, revision 3
What it standardizes
PSP is a transport-agnostic signaling layer for WebRTC meshes. It standardizes how peers:
- identify themselves;
- announce presence and discover candidate peers;
- exchange offers, answers and ICE candidates;
- negotiate roles and topology hints;
- handle retries, liveness and teardown;
- run over any signaling transport: WebSocket, HTTP polling, Nostr, DHT relays, pub/sub, LAN gateways.
It does not define media, application payloads, or how data is routed once a connection is up.
Envelopes
Every message is one JSON envelope with psp_version, type, network, session_id, from, message_id and timestamp, plus a body. Peers are discoverable to each other, and messages deliverable, only when both network and session_id match.
| Kind | Types |
|---|---|
| Discovery | announce, withdraw, discover, peer_list, redirect |
| Negotiation | connect_request, connect_accept, connect_reject, offer, answer, ice_candidate, ice_end, renegotiate |
| Control | ping, pong, bye, error, ack |
| Extension | ext |
Beyond the basics
Revision 2 added signaling carried over the mesh, relay on demand, anchors, peer channel control frames and relay federation. Revision 3 added relay identity, relay hints in peer_list, relay records and pointers, tunnels for relays behind NAT, punched relay connections, links between relays, and relay selection by peers. All of it is additive: a peer or relay that implements none of it remains conforming.
FreeRTC is the reference relay and client.