They open the link while your page is open

The file isn't stored along the way, so your page must stay open until they have it.

Our server helps the two browsers find each other, like an operator connecting a phone call. It passes on a few small messages. Those that set up the connection are locked, so it can't read them.

They see the file's name and size and choose whether to download it.

Connecting the two browsers

The sender's page opens a WebSocket to our server and registers its link IDs. When the recipient opens their link, their page joins with the link ID and a random attempt ID, new for each page load and each retry. The server pairs at most one recipient page with a link at a time and tells both sides.

The browsers then set up a WebRTC connection. The offer, the answer and the network candidates are encrypted with the signal key before they reach our server. Each message is bound to its link, attempt and direction, so the server can't read or change the messages. The server also can't send a message back to the side that sent it, move it to another link or replay it into another attempt. Replaying old messages can at most make one attempt fail, which dropping them would do anyway.

This matters beyond privacy: the setup messages carry the fingerprints of WebRTC's own DTLS encryption. Because the server can't change them, it can't put itself between the two browsers. All of this rests on our server not having the key.

That is what the safety number is for. Each browser makes a new certificate for every connection. The recipient's browser sends a commitment to its fingerprint, a hash, before the sender's browser makes its offer. Both browsers then compute six digits from the two fingerprints of their own connection. With someone in between there are two connections, so the two screens show different numbers. Because of the commitment, a party in the middle can only guess: one chance in a million per connection. The number is shown on screen only, never sent or stored.

With a safety number, the recipient reads their number aloud and the sender compares it. Nothing about the file is sent until both have said it matches, and “It differs” on either side stops the attempt. Once the recipient's browser has answered an offer, it makes a new connection only when the recipient clicks Try again, except that after the sender allows our relay it joins again by itself, at most 4 times per click. Someone in the middle can fake that message, so up to 4 more guesses per click come with no failure shown and no click. Recovering a dropped route, described below, keeps the same connection and the same number. The sender's page stops offering a link after 5 attempts that ended before both confirmed, each limited to 5 minutes. An attempt the sender's page stopped because the two pages run different versions doesn't count: no safety number was shown. The check shows that nobody sat between the two browsers. It can't show that the page code itself is honest.

If the connection to our server drops, both pages try to reconnect by themselves. The sender's page registers its links again. A recipient who was still connecting tries again a few times before giving up. For a minute after our server starts, it tells a recipient whose link it doesn't know yet to wait. So the recipient keeps trying while the sender's page registers the link again. A transfer that has already started doesn't need our server and carries on, as long as the route between the browsers holds.

If the route between the two browsers drops while their connection is open, the pages try to get one back without starting over. The recipient's page sends its join to our server again, and the server gives both pages the connection details again. The sender's browser then looks for a route again on the same connection, with a new offer and answer, encrypted like the first and checked against the same two certificates. The keys and the safety number stay the same, and the transfer goes on where it stopped, with no click. This never adds the relay to a connection that didn't already use it. If no route comes back within 30 seconds, the attempt ends as a lost connection, and Try again continues a file's download. It needs both pages' connections to our server. A change of network can break a page's connection to our server too. Once the browsers' connection has opened, our server gives each page a random token, and a page whose connection to our server drops connects again and uses its token to take its place in the transfer back. Our server keeps that place for up to 30 seconds after a connection drops without closing, and a page that closes frees it at once. If the page doesn't come back in time, the transfer ends as a lost connection. The repeated join shows our server that this transfer's connection dropped, and when. A page that takes its place back shows it that its new IP address belongs to the same transfer. We have tested the recovery only in Chromium, with a route cut for about 6 to 8 seconds; Firefox and Safari are untested. We have tested taking a place back with a connection cut inside the browser, and in Chromium with a page whose public IP address changed behind a simulated home router in the middle of a transfer. A real change of network, such as from Wi-Fi to mobile data, is untested.

The first setup message each browser sends says which version of the transfer format its page uses. If the versions differ, the browsers don't connect and nothing about the file is sent. Pages that have this check then say which of the two needs a reload. Every page of a release sends the same version, so the version reveals nothing about the transfer.