Untrusted relay
Every message is encrypted and authenticated end to end, keyed by a Noise IKpsk1 handshake. The relay sees sizes and timing — never contents, keys or identities.
PeerConnect pairs two applications — a phone and a laptop, a web app and a wallet, two services on different networks — through a WebSocket relay that can’t read, forge or replay what they say, and that stores nothing.
A private, reliable channel between exactly two peers. No accounts, no message store, no trust in the server in the middle.
Every message is encrypted and authenticated end to end, keyed by a Noise IKpsk1 handshake. The relay sees sizes and timing — never contents, keys or identities.
No database, no accounts. A room exists on a relay only while someone is connected; the relay can restart, or be replaced by another, and peers simply reconnect.
Messages are numbered, acknowledged and resent after any disconnection. Send while the other side is away; it arrives when it comes back. The sender is the queue.
After first contact, both peers move to a room ID derived from their two identities. A leaked QR code or link leads nowhere.
An open specification with test vectors: implement a peer in any language, or have your AI agent do it from llms.txt. The Rust and JavaScript implementations in the repository are there to read.
A short written specification; test vectors reproduced by an independent implementation; deterministic simulations and chaos tests that cut, replay and tamper with traffic.
Four steps. The relay takes part in none of the secrets.
The inviter draws a random 32-byte room secret. From it come the room’s ID on the relay — an Ed25519 public key — and a pre-shared key for the handshake.
Room.create(relay)The invite is the relay URL, the secret and the inviter’s public key. Show it as a QR code, send a link, paste it — any private channel will do.
wss://relay…#secret‖keyThe joiner proves to the relay that it holds the room key without revealing it, then runs the Noise handshake. The inviter pins its identity, and both move to a pair ID only they can compute.
invite ID → pair IDMessages flow both ways, encrypted with ChaCha20-Poly1305. Networks drop, relays restart, laptops sleep: peers reconnect, handshake again and resume exactly where they stopped.
reconnect · resume · exactly onceGet tokens over HTTP, implement the open protocol in any language, or hand the specification to your AI agent.
No SDK to install: see Get access, the API reference and llms.txt.
# Try it: a trial token, no account (two hours)
curl -X POST https://peerconnect.dev/api/trial
# → {"token": "eyJ…", "expires_at": …, "relay_url": "wss://relay.peerconnect.dev"}
# Your app’s server: a token per user of yours, with the app secret
curl https://peerconnect.dev/api/apps/app_…/tokens \
-H "authorization: Bearer $PEERCONNECT_APP_SECRET" \
-H "content-type: application/json" \
-d '{"user": "user-42"}'
# Then each peer connects with its own token
# wss://relay.peerconnect.dev/v1/<room id>?token=<token>A peer, in outline (SPEC §4–§6):
1. open wss://relay.peerconnect.dev/v1/<room id>?token=<token>
2. relay → HELLO nonce[32]
3. peer → JOIN role ‖ Ed25519 signature over the nonce
4. relay → PRESENCE (is the other peer here?)
5. both ⇄ Noise_IKpsk1_25519_ChaChaPoly_SHA256 handshake
6. both ⇄ numbered, acknowledged messages; resent after reconnecting
7. text "ping" every 25 s
Check every step against test-vectors/v1.json.Read https://peerconnect.dev/llms-full.txt and implement a PeerConnect peer in <your language>:
rooms and invites, joining the relay with a token, the Noise handshake and
pairing, and the reliable stream. Reproduce test-vectors/v1.json first. Use
https://peerconnect.dev/api/trial for tokens while testing. The repository's Rust and
JavaScript implementations are a reference, not a dependency.Nothing to configure, nothing to back up. The relay forwards frames between two seats and forgets them.
One Durable Object per room with WebSocket Hibernation: idle rooms cost nothing, and it runs on Cloudflare’s network.
A static binary in an empty image. Put it behind any TLS proxy, or use the bundled Caddy setup for automatic HTTPS.
One command: cargo install peerconnect-relay. Four environment variables, connection limits per client address included.
Just experimenting? Use the public relay wss://relay.peerconnect.dev — the one the demo uses. It is for testing, with no uptime guarantee.
Status: the v1 specification is a draft for review, and the code has not had an external audit. Build on it, test it, try to break it — but do not protect high-value assets with it yet.
Known limitations →Approve on your phone what a site on your laptop asks for, through a relay that cannot see what you signed.
Pair a mobile app with a desktop app once; sync, control or share whenever both are online.
Move files, clipboard or settings between your own devices, without an account or a copy in the cloud.
Reach a service or agent behind NAT from your phone, without opening ports or trusting a broker.
No. Messages are encrypted and authenticated with keys only the two peers hold. A relay can drop, delay or cut connections — peers notice and recover — but it cannot read, forge, replay or reorder messages without being detected.
WebRTC connects peers directly, for real-time media, and needs a signaling server plus STUN/TURN to get there. PeerConnect always goes through a relay over plain WebSockets, so it works wherever the web does, and it adds what WebRTC leaves to you: pairing, persistent identities and reliable delivery across reconnections.
WalletConnect is an ecosystem built around crypto wallets and its own network. PeerConnect is a small, general-purpose transport: any two apps, any payload, and a stateless relay you can run yourself in minutes.
Send anyway. The sender keeps each message until the other side acknowledges it, and delivers it as soon as both are connected at the same time. The relay stores nothing, so an app that quits before then should keep its own copy of what it has not seen delivered.
Nothing you need to handle. Rooms are not stored on the relay: peers reconnect, authenticate again and resume the stream without losing or duplicating a message.
Not yet. The protocol is a v1 draft, extensively tested but not externally audited, and the wire format may still change. It is ready for prototypes and feedback.
Open the demo on two devices, scan the QR code, send a message. The encryption runs on your devices; the relay only ever forwards ciphertext.
Open the live demo