Add shareable invitation links

Codes now travel as links with the code in the URL fragment, which the
app reads and clears before mounting (and on hashchange). An offer link
opens a preview that suggests an idle slot, preferring the one paired
with the sender's device, and only fills in the code; the user still
creates the answer. Answer links reach the waiting sender tab over a
same-origin BroadcastChannel, are acknowledged once and reported as
used afterwards, and fall back to copy and paste when no tab answers.

The panel offers Share link where the Web Share API accepts URLs, Copy
link, and the bare code under a disclosure. The browser check covers
the offer dialog, clean URL, answer relay, reuse, fallback on another
origin, an invalid fragment, axe on both dialogs and exact bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
SchluffeandClaude Opus 5.5 committed 2026-10-19 22:44:15 +02:00
1 parent 8bd37ac8b1
commit 43ee7f119f
14 files changed
+422 -59

No files matched your search

+27 -11
View File
@@ -4,7 +4,8 @@ Current version: **0.0.5** (draft). See the [changelog](CHANGELOG.md) for releas
and compatibility changes.
Browser-to-browser file sharing with Vue 3 and WebRTC. No accounts, signaling
backend, or server-side file storage. You exchange connection codes manually.
backend, or server-side file storage. You exchange invitation links or
connection codes yourself, through any messenger.
Direct connections are the default. TURN relaying is optional and requires
explicit opt-in by both people; no relay is configured automatically.
@@ -40,12 +41,18 @@ remain available. Up to 100 connection slots are supported.
## How it works
1. The person starting the connection selects one or more files and configures STUN (PageQuit by default, Google,
Cloudflare, a custom provider, or None). They create a code and send it
privately to the intended receiver through an authenticated channel. Normal
messenger copy/paste is supported; there is no need to transcribe codes.
2. The receiver pastes the code, creates an answer, and sends it back. The sender
pastes the answer. Gathering waits for completion, up to 30 seconds; a timeout
fails rather than quietly exporting incomplete connection information.
Cloudflare, a custom provider, or None). They create a code and send it as a
link (**Share link** where the browser supports it, or **Copy link**)
privately to the intended receiver through an authenticated channel. The bare
code remains available under **Show code instead**; there is no need to
transcribe either.
2. The receiver opens the link or pastes the link or code. An opened link shows a
preview and lets them choose which connection receives it; nothing is sent
until they click **Accept & create answer**. They send the answer link back.
Opened in the browser that holds the sender's tab, it connects that tab
directly; otherwise it shows the answer to copy, and the sender pastes it.
Gathering waits for completion, up to 30 seconds; a timeout fails rather than
quietly exporting incomplete connection information.
3. **Both people compare both full SHA-256 certificate fingerprints** over a
channel whose authenticity and integrity they trust, such as in person.
Your fingerprint must equal their “Their fingerprint”, and vice versa.
@@ -163,10 +170,19 @@ one network. A VPN is not automatically a guarantee against address disclosure.
Connection codes are **compressed and Base64url-encoded, not encrypted**
(`HC1.` followed by deflated JSON). They contain SDP, including candidate
addresses, temporary ICE credentials and certificate fingerprints. Peers and anyone who sees these codes (including the messaging
service used to exchange them) may learn connection details. Local addresses may
be obscured by the browser, but this app does not provide anonymity. Treat codes
as private session information; do not publish them.
addresses, temporary ICE credentials and certificate fingerprints. Peers and
anyone who sees these codes (including the messaging service used to exchange
them) may learn connection details. Local addresses may be obscured by the
browser, but this app does not provide anonymity. Treat codes as private session
information; do not publish them.
Invitation links carry the code after `#`. Browsers do not send this fragment to
the app host, and the app removes it from the address bar on opening. A link is
otherwise exactly as sensitive as its code: recipients and messengers see it, and
browser history (including synced history) may keep it. Opening an offer link
never answers automatically. Answer links reach the waiting tab over a
same-origin `BroadcastChannel`; other sites cannot post to it. See
[the invitation design](docs/invitations.md).
Restrictive NATs or firewalls can prevent direct connections. There is no silent
TURN retry. To permit a relay, both people must explicitly check **Allow a TURN