# HellCon Sends a file directly from one browser to another over WebRTC. Nothing passes through a server: the file goes peer to peer and the receiver's browser streams it straight into its download manager, so it never has to fit in memory. ## Use 1. The sender picks a file and clicks **Share via tracker**, then gives the 8 character code to the receiver, who enters it and clicks **Receive**. Without a tracker, open **Manual** on both sides instead and exchange the offer and the answer over any channel you trust. 2. Both sides now see a **security check**: two codes, *You* and *Peer*. Compare them over a channel you trust, e.g. a call: the sender's *You* must equal the receiver's *Peer* and vice versa. Only if they match, click **Codes match**. Otherwise someone is in between, click **Codes don't match**. Nothing is transferred before both sides confirmed. 3. The receiver sees the file and clicks **Download**. One tab runs one transfer at a time, starting another ends the current one. **Use STUN** (on by default) is needed between different networks, without it only the same network or a VPN works and no STUN server is contacted. The STUN servers and trackers can be changed under **Servers**, they are kept in this browser only. ## Run Needs Node.js and pnpm, see `package.json` for the versions. ```sh pnpm install pnpm dev # development server pnpm build # type check and build into dist/ ``` ## Host `dist/` is a static site and can be served by any web server, with these requirements: - **HTTPS** (or `localhost`): service workers and Web Crypto only work in a secure context. - **`sw.js` next to `index.html`**, served as JavaScript from the same origin. It streams downloads and is registered for the `download/` path below the app, so requests there must reach it and not be rewritten, e.g. by a single-page fallback. - The trackers are public [WebTorrent](https://webtorrent.io/) trackers by default (`wss://`). Any WebTorrent compatible tracker works, including a self-hosted one. Only the code exchange goes through it. ## Test ```sh pnpm test:install # once, downloads Chromium and Firefox for Playwright pnpm test # everything except the large tests, needs network for the "live" tests pnpm test:large # 2.5 GiB transfers and a 40 s stall ``` ## Known limitations - Firefox keeps a download "in progress" when the sender vanishes in the middle of it, until the user cancels it. HellCon reports the failure, the download manager doesn't. Chromium fails the download, but only after about 16 s. Details in `TODO.md`. - Interrupted transfers can't be resumed, they start over. - Private windows may block service workers, then receiving is not possible and HellCon says so.