# 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 8 character code. Tell it to the receiver, it works for 6 minutes. Whoever has the code can get the file, 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. The tracker and the STUN servers see it too, from the request itself. Nobody without the code learns it through the tracker. - Settings (STUN on or off, your server lists) are kept in your browser only. - 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. Both sides must use at least one tracker in common to find each other. ## 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`. ## 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).