Both sides used to contact every STUN server and tracker at once, so each of them learned the IP
address and each tracker that A sent to B.
Connections now use one STUN server: the first in the list that reports a public address to a
throwaway probe connection within 2 s. It stays for the page's lifetime. If a connection gets no
address from it, the next connection probes on from the server after it. A probe runs only while a
session waits for it and stops once none does, STUN is turned off or the list changes.
The sender joins the first tracker that accepts it and moves to the next only once that one rejects
it, can't be reached within 10 s or is lost. The receiver walks the list with one offer each and
stays where a tracker reports a seeder (complete), which is the sender: it always announces before
anyone has the code. Trackers it passed keep its offer. backend/tracker.mjs now sends complete.
wss://tracker.pagequit.net comes first in the default trackers, the public ones are fallbacks.
TODO.md drops the server tasks, they aren't work on this codebase.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
backend/ runs both as Docker Compose services, neither is needed: the client works with any
WebTorrent tracker and STUN server. The tracker is one file on Node and ws that does only the part
of the protocol HellCon uses. It accepts allowed origins only and messages of at most 16 KiB, only
announce, one offer per announce and answers only to offers it delivered, once. Forwarded messages
are rebuilt from the checked fields. It limits the message rate, the signaling each connection
sends, the bytes queued for a peer that stops reading, connection age, connections per IP and in
total, and peers per swarm. It logs nothing. coturn runs STUN only on the host network, pinned,
read-only and without capabilities beyond the one its binary needs.
backend/tracker.spec.mjs tests its rules one by one, e2e.spec.ts sends a real file through it alone
in both directions between Chromium and Firefox.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides derive an HMAC key from the code, next to the swarm ID, and sign
their role and both DTLS fingerprints as they see them. An interposer or a
peer that found the swarm without the code can't, so its connection ends and
the next peer gets its turn, as does one that proves nothing within 10 s.
Tracker transfers need no comparing and no clicks anymore, the manual
exchange keeps its fingerprint check. The swarm ID changes once more, old and
new clients don't find each other.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Anyone who sees the swarm IDs could test a GPU's worth of codes against all
of them at once, about 8 % of the codes within a share's 6 minutes. 600,000
iterations of PBKDF2-SHA-256 cost a share ~50 ms and make that negligible.
Old and new clients no longer find each other.
Also note the open decisions for the server at pagequit.net.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Core in src/main.ts: manual SDP copy/paste exchange (default, no
tracker) and optional WebTorrent tracker signaling, STUN opt-out
- Fingerprint security check, sender confirms before sending
- ICE gathering stops after the first STUN result (5 s hard cap)
- Receiver writes to OPFS via an inline dedicated worker instead of RAM
- Playwright e2e suite across Chromium/Firefox and all signaling modes,
opt-in 2.5 GiB transfer test (pnpm test:large)
- TODO.md with review findings and the service worker plan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>