Files
HellCon/README.md
T
SchluffeandClaude Opus 5.5 2e47b55901 Salt the tracker swarm with the clock or an own salt
The code used to be derived with a fixed salt, so a tracker could compute a
table from swarm to code ahead of time, once for every share. Now the salt
is the UTC 6 minute window the share was made in, and the code's new 11th
character names that window, so the receiver finds it even with a clock
hours off. Use own salt adds a salt both sides agree on, which nobody can
guess ahead for; Generate makes a random one. The salt is locked while a
tracker share or search runs, and a receiver that finds no sender is told
to check the salt too.

Settings are no longer kept in localStorage: a remembered list or salt that
differs from the other side's would silently break shares. The core now
reports when a share expires and until when it lasts, and the session owns
a tracker's timers, so a socket still closing after an abort announces
nothing more. Header options line up with the cards, disabled switches look
disabled, and sizes, percents and times don't wrap. postcss 8.5.32.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 01:14:27 +01:00

130 lines
6.5 KiB
Markdown

# HellCon
Send a file straight from one browser to another. No account, no upload, no app to install, and no
size limit: the file goes directly to the other person and is never stored on a server.
## How to send a file
1. **Sender:** open HellCon, drop a file onto the Send card and click **Share via tracker**. You get
an 11 character code. Tell it to the receiver, it works for 6 minutes. Whoever has the code can
get the file, or pretend to be you, so give it to nobody else.
2. **Receiver:** open HellCon, enter the code under Receive and click **Receive**.
3. **Receiver:** once connected, you see the file's name and size. Click **Download** to save it.
Keep both tabs open until the transfer is finished. Starting something new in a tab ends what that
tab was doing.
### Without a tracker
If you'd rather not use a tracker, open **Manual** on both sides. The sender creates an offer, a
long block of text, and sends it to the receiver any way you like, e.g. a chat or an email. The
receiver pastes it, creates an answer and sends that back. The sender pastes the answer and clicks
**Connect**. The offer and answer contain your network addresses, so only share them with the person
you're sending to. Both sides then compare the security check (see below) and click **Codes match**.
## The security check
Before anything is transferred, both sides make sure they are connected directly to each other and
not to someone who placed themselves in between.
With the code this happens by itself: each side proves to the other that it knows the code, tied
to the encryption keys of this very connection. Someone in between, or anyone else who doesn't
know the code, can't do that, and HellCon drops the connection and waits for the right one.
The manual exchange has no code, so there you compare yourselves. Once connected, both sides see two
short codes: **You** and **Peer**. Compare them with the other person over a channel you already
trust, ideally a call or in person:
- your **You** must be their **Peer**, and
- your **Peer** must be their **You**.
If both match, you are connected directly to each other. If they don't, someone has placed
themselves in between: click **Codes don't match** and nothing is sent. Nothing is transferred before
both sides confirmed, so take the few seconds to really compare them.
The codes are taken from the encryption keys of the connection. Someone in between would need their
own keys, which show up as different codes.
## How it works
The file travels over a direct, encrypted WebRTC connection between the two browsers. To set that up,
the browsers need two things:
- **Finding each other.** The code puts both browsers into the same group on a public
[WebTorrent](https://webtorrent.io/) tracker, which only passes the connection details back and
forth. They are encrypted with the code, so the tracker can't read them, and neither can anyone
else in the group without the code. It never sees the file. With the manual exchange you play the
tracker yourself.
- **Reaching each other.** Most devices sit behind a router and don't know their public address.
A STUN server tells them. With **Use STUN** turned off no STUN server is contacted, which works
only on the same network or over a VPN.
On the receiving side, HellCon hands the incoming data to the browser's own download manager while
it arrives. That's why files larger than your memory work too, and why the download shows up in
your browser's download list.
There is no relay server. If both sides are behind very strict networks, e.g. some company or mobile
networks, a direct connection may not be possible.
## Privacy
- The file only goes to the person you connected with.
- That person learns your IP address, as with any direct connection. One STUN server and one or a
few trackers see it too, from the request itself. HellCon tries the STUN servers in order and
sticks with the first that answers. The sender stays on the first tracker that accepts it. The
receiver goes down the list until it finds the sender, and the trackers it passes keep its
encrypted offer. Nobody without the code learns your address through a tracker.
- Nothing is kept: every reload starts with the default settings.
- Whoever hosts HellCon serves the code that runs in your browser. If you'd rather not trust that,
host your own (below).
## Settings
Under **Servers** you can change which STUN servers and trackers your browser uses, one address per
line. Any WebTorrent compatible tracker works, including one you run yourself. **Reset to defaults**
brings back the original lists. The order matters: the sender stays on the first tracker that
works, the receiver tries them in order until it finds the sender. Both lists must contain that
tracker.
The code goes to the tracker mixed with a salt, which changes with the clock every 6 minutes (by UTC):
guessing codes ahead of time pays off for 6 minutes at most. The code's last character tells the
receiver which 6 minutes it was made in, so the two clocks may be up to 3 hours apart. Someone could
still guess ahead for a particular 6 minutes. If that worries you, turn on **Use own salt** on both
sides and enter the same salt, agreed on any way you like. **Generate** makes a random one. Nobody
can guess ahead for a salt they don't know.
Nothing of this is kept, a reload brings back the defaults.
## Host your own
HellCon is a static website, any web server can host it. Build it with Node.js and pnpm:
```sh
pnpm install
pnpm build
```
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`.
Your own tracker and STUN server are optional, any public ones work. `backend/` has both as Docker
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.
## 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.
- Private windows may not allow the background part that saves downloads. Receiving then doesn't
work, and HellCon tells you so.
## License
MIT, see [LICENSE](LICENSE).