Version the protocol for 1.0, fail downloads the page abandoned

PROTOCOL (hellcon/1) goes in front of the PBKDF2 salt and names the data
channel, so different versions never meet via a tracker and the manual
receiver tells a sender on another protocol apart. The footer shows it, the
receiver's hints ask to compare it. Forks are asked to name their own.

public/sw.js and the page exchange a VERSION, a mismatch fails the download
with outdated. The worker fails a download after 20 s without a chunk or
ping from its page, else Firefox saves the truncated file of a closed tab as
complete.

The build uses relative links and works under any path. On https only wss:
trackers and ws: to this device are accepted, one the browser refuses to
open counts as lost. Also: a file read short stops the transfer, an offer
waiting on a lost tracker isn't answered, a share ended while its key was
derived opens no tracker, and tracker and receiver errors lose hidden
characters. The README lists what isn't planned and the phone limitation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
SchluffeandClaude Opus 5.5 committed 2026-10-30 15:10:09 +01:00
1 parent 44a8a72261
commit ac4d496a48
11 files changed
+399 -56

No files matched your search

+30 -1
View File
@@ -14,6 +14,10 @@ size limit: the file goes directly to the other person and is never stored on a
Keep both tabs open until the transfer is finished. Starting something new in a tab ends what that
tab was doing.
Both sides need the same protocol, shown at the bottom of the page. A HellCon hosted elsewhere may
run another one, the receiver then finds no sender, or with **Manual** says the sender runs another
protocol.
### Without a tracker
If you'd rather not use a tracker, open **Manual** on both sides. The sender creates an offer, a
@@ -114,7 +118,9 @@ Then serve the `dist/` folder, with these requirements:
- **HTTPS.** Browsers only allow the parts HellCon needs on secure pages (`localhost` is fine for
trying it out).
- **`sw.js` next to `index.html`.** It streams the downloads. Requests to the `download/` path below
HellCon must reach it unchanged, so don't rewrite them to `index.html`.
HellCon must reach it unchanged, so don't rewrite them to `index.html`. Any path works, e.g.
`https://example.org/hellcon/`, with the trailing slash: the page links its files relative to it,
so redirect `/hellcon` there.
Recommended, as response headers, a `<meta>` can't set them (`index.html` sets
`Referrer-Policy: no-referrer` and the rest of its Content-Security-Policy itself, which keeps out
@@ -133,12 +139,35 @@ Your own tracker and STUN server are optional, any public ones work. `backend/`
Compose services: a tracker that only does what HellCon needs, with an Origin allowlist and limits,
and coturn as STUN server. `backend/compose.yaml` says how to set them up.
If you change how HellCon talks to the other side, e.g. the code, the encryption or the messages,
give `PROTOCOL` in `src/core.ts` a name of your own, e.g. `yourname/1`, and count up from there.
## Not planned
These were considered and decided against, please don't ask for them without a new reason. HellCon
is copy and paste a code, with public trackers and STUN servers. Anything that puts state in the URL,
needs infrastructure of its own or only helps small files doesn't pay off.
- **The code in a share link:** the code would end up in the browser history and wherever links get
handled, for one click less.
- **Another code alphabet,** e.g. one that ignores case or uses words: most people copy and paste
the code anyway.
- **Saving without the service worker,** holding the file in memory instead: useless for files of
several GB.
- **TURN servers or a relay-only mode:** too much infrastructure to host and test.
- **A longer or extendable share,** **several files as a zip,** and **resuming in Chromium:** not
for now.
- **Keeping a phone sending in the background,** e.g. with a silent audio loop: the sender's page
has to stay in front.
## Known limitations
- **Firefox:** if the sender disappears in the middle of a transfer, HellCon reports the failure,
but Firefox keeps showing the download as in progress until you cancel it.
- **Chromium:** notices a vanished sender only after about 16 seconds.
- An interrupted transfer can't be resumed, it starts over.
- **Phones:** the sender's page has to stay in front, the connection is lost once it goes to the
background. Receiving keeps going.
- Private windows may not allow the background part that saves downloads. Receiving then doesn't
work, and HellCon tells you so.