<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[tosstome Blog]]></title><description><![CDATA[tosstome Blog]]></description><link>https://tosstome.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6ae4a93a4f1216dcf647bc9d/ae726539-fe1c-4e15-9101-1f618e0c2fdc.png</url><title>tosstome Blog</title><link>https://tosstome.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 12:16:32 GMT</lastBuildDate><atom:link href="https://tosstome.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How tosstome works: WebRTC, relay fallback, nothing stored]]></title><description><![CDATA[Last checked 2026-10-28 tosstome is a small service on Cloudflare Workers plus a web page. The server introduces devices to each other and, only when it…]]></description><link>https://tosstome.hashnode.dev/how-tosstome-works-webrtc-relay-fallback-nothing-stored</link><guid isPermaLink="true">https://tosstome.hashnode.dev/how-tosstome-works-webrtc-relay-fallback-nothing-stored</guid><category><![CDATA[WebRTC]]></category><category><![CDATA[File sharing]]></category><category><![CDATA[open source]]></category><dc:creator><![CDATA[Jane White]]></dc:creator><pubDate>Fri, 30 Oct 2026 14:29:56 GMT</pubDate><content:encoded><![CDATA[<p>Last checked 2026-10-28</p>
<p>tosstome is a small service on Cloudflare Workers plus a web page. The server introduces devices to each other and, only when it has to, passes data along. It never stores files.</p>
<h2>1. Finding each other</h2>
<p>When you open the page, the browser connects to the server over a WebSocket. Devices whose connections come from the same public IP address, which usually means the same home or office network, are put in the same group and shown in each other's Nearby list. The address is hashed before it is used. For devices on different networks, a 6-digit code puts them in a temporary group of their own.</p>
<h2>2. Connecting directly</h2>
<p>When you tap a device, the two sides exchange WebRTC connection details through the server and try to open a direct data channel, using Cloudflare's STUN service to discover how to reach each other through home routers. A direct WebRTC channel is encrypted end to end by the browsers (DTLS).</p>
<h2>3. Falling back to a relay</h2>
<p>Some networks block direct connections: corporate firewalls, guest Wi-Fi, mobile carriers with carrier-grade NAT. If the direct channel does not come up within a few seconds, both sides connect to a relay on Cloudflare instead. The relay forwards each chunk as it arrives and keeps nothing. Traffic to and from the relay is encrypted with TLS, but the relay is not end-to-end encrypted yet; that is on the roadmap.</p>
<h2>4. Moving the data</h2>
<p>The same transfer protocol runs in the browser and in the command line tool: small JSON control messages plus binary chunks, with acknowledgements from the receiver so the sender never floods a slow connection. It behaves the same over a direct channel and over the relay.</p>
<h2>5. Inboxes</h2>
<p>The command line tool keeps an always-on inbox. It creates two secret keys: an agent key that stays on the computer, and a send key that goes in the inbox link after the <code>#</code>. Browsers do not send that part of a link to the server, and the key is passed inside the WebSocket instead. The server keeps only SHA-256 hashes of both keys. When a phone opens the link and sends, the server passes WebRTC connection details between the phone and the computer, just as it does between two browsers, so on the same network the files go straight to the inbox folder without leaving it. If no direct channel comes up, both sides use a relay session instead. The command line tool connects directly the same way when it sends to a browser on a 6-digit code, or when a browser sends to it from the Nearby list.</p>
<h2>What is not built yet</h2>
<ul>
<li>End-to-end encryption on the relay path</li>
<li>Signed, persistent device pairing in the browser</li>
<li>Rate limits beyond the per-role lockout on wrong inbox keys</li>
</ul>
<p>Read the <a href="https://toss2.me/privacy">privacy page</a> for what the service sees.</p>
<h2>Questions</h2>
<h3>Is tosstome end-to-end encrypted?</h3>
<p>Direct WebRTC transfers are, by the browser's DTLS. Relayed transfers are encrypted between each device and Cloudflare with TLS, but not end to end yet.</p>
<h3>What is WebRTC?</h3>
<p>A browser standard for real-time, peer-to-peer connections, used by video calling apps. tosstome uses its data channels to send files directly between browsers.</p>
<h3>Are my files uploaded or stored anywhere?</h3>
<p>No. Files go straight from one device to the other over WebRTC when the networks allow it. When they do not, the file passes through a relay on Cloudflare that forwards the bytes as they arrive and keeps nothing. If the receiver is offline, nothing is sent.</p>
<h3>Why does it need the internet if it is peer to peer?</h3>
<p>The browsers need a server to find each other and exchange connection details. Once connected directly, file data goes between the devices.</p>
<h2>Related</h2>
<ul>
<li><a href="https://toss2.me/privacy">Privacy</a></li>
<li><a href="https://toss2.me/different-networks">Share files between devices on different networks</a></li>
<li><a href="https://toss2.me/large-files">Send large files without uploading them</a></li>
<li><a href="https://toss2.me/alternatives">Snapdrop alternatives that still send peer to peer</a></li>
</ul>
<hr />
<p>Originally published at <a href="https://toss2.me/how-it-works">https://toss2.me/how-it-works</a>.
 </p>
]]></content:encoded></item></channel></rss>