libp2p WebRTC over QR

Two browsers connect directly as libp2p peers — no relay, no signaling server. The WebRTC offer and answer travel out-of-band as signed QR codes: one device scans the code off the other screen.

1 Start browser peer

Creates a libp2p node with a fresh key pair. Its Peer ID signs every payload you show.

What this sends, and to whom

Checking the network means asking a STUN server what address your packets arrive from. Two operators answer that question here, Cloudflare and Google, and each sees the public address the request came from: over IPv4 that is your router's address, shared with everyone behind it — over IPv6 it is this device's own address, which is not shared with anyone.

A STUN request carries nothing else. No page address, no cookies, no browser name — less than any website you open is told about you. It happens again whenever you create or accept an invite, because a direct connection cannot be made without those addresses.

The answer comes back to this page and stays here. Nothing is sent to us: this page has no backend to send it to.

Your Peer ID not started

What your peer identity is, and where its key lives

Your Peer ID. It travels inside every invite you create — the other side needs it to check your signature, because the public key is embedded in it. The private key it was derived from is what actually signs, and it never leaves this device.

In a browser tab the key is kept for that tab, so reloading - or a phone waking from standby - comes back as the same peer instead of a stranger, while another tab stays a different peer you can still connect to. Installed to a home screen there is no second tab, so the key is kept for the app instead and survives between launches. Either way the same identifier appears in every invite from here until you reset it, and resetting clears both.

2 Connect to someone

Invite someone, or scan the code they are showing you. Either one gets you to the same place.

Someone sent me a link and tapping it did not work

3 Send data over libp2p

Once the handshake completes, messages travel over a libp2p protocol stream on the WebRTC data channel. Files go through Helia: the sender adds the bytes and announces the CID, the receiver pulls them with bitswap over the same connection.

Not connected
Drop a file here or click to choose one — it is added to Helia and its CID is sent over the chat stream

Their phone camera opens the same link - or send it to them.