Files
HellCon/TODO.md
T
SchluffeandClaude Opus 5.5 22d794965e Add an own tracker and STUN server in backend/
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>
2026-10-25 15:26:42 +01:00

46 lines
2.7 KiB
Markdown

# TODO
## Server at pagequit.net
`backend/` holds both servers, tested locally: a real transfer Chromium to Firefox through only them,
and the tracker's limits one by one. Left to do on the server:
- Replace the running coturn with `backend/compose.yaml`. coturn 4.18 has the admin CLI, DTLS, the
RFC 3489 MAPPED-ADDRESS and the software attribute off by default, the `--no-` options for them are
gone. Set `ORIGINS` in `backend/.env`, and `CADDY_NETWORK` if Caddy's network isn't `caddy`.
- Add `tracker.pagequit.net` to Caddy and DNS (A record, like `stun.pagequit.net`).
- Check that the logs hold no client addresses: transfer once, then
`docker compose logs | grep <your IP>` should stay empty.
- Then put `wss://tracker.pagequit.net` first in `DEFAULT_TRACKERS` and keep the public trackers as
fallbacks.
- coturn doesn't rate limit STUN requests. A response is about as big as the request, so it's a weak
amplifier. If it gets abused, an nftables `limit` on the UDP port would help.
## Ideas
- Resume interrupted transfers: the receiver already reports how much the download manager has
read (`{ read }`), which is where a new connection could continue. The browser can't append to a
finished or failed download though, so a resume would have to start a new one.
## Open observations
- Firefox ignores an errored service worker response stream: when the sender vanishes, the receiver
logs "download failed: connection lost", but the download stays "in progress" until the user
cancels it. Closing the stream instead is worse, Firefox then reports the truncated file as
complete despite `Content-Length`. Chromium fails the download, but only once the connection
counts as failed (~16 s), because its data channel never fires `close` for a vanished peer.
- Firefox also saves a truncated file as complete when it stops the service worker in the middle of
a download (after 30 s without events). The receiver's pings (`KEEPALIVE`) prevent that, covered by
`large: firefox survives a 40 s stall`. A browser that stops it anyway would still never show
"download complete" or "delivered", only its download manager would be wrong.
- `large: firefox sends 2.5 GiB` hit the 5 minute timeout once (first run after the normal suite),
not reproduced in 3 runs since. The report was lost; the attached logs will show the cause if it
happens again.
- `boundary: chromium sends an empty file` timed out in the first two full runs after `backend/`'s
tests were added (2026-10-25), with empty logs on both sides. It passed alone 8 times, and in 5
full runs since, one of them with a cold Vite cache. The suite without the new tests passed 4
times. Not reproduced, cause unknown.