During a session authenticated by both device identities, one person proposes a WebTorrent tracker and the other confirms it. Both contribute a nonce over the data channel; HKDF binds both device keys, the session fingerprints and the tracker URL into a non-extractable base key stored with the connection. Forget device, a replaced paired device and Turn off reconnect clear it. Reconnect joins a daily swarm derived from that key. Offers, answers and codeless wakes travel as AES-GCM envelopes bound to the tracker routing fields. The lower device key offers; the other device wakes it when it arrives second. Retries are spaced and capped, one attempt per slot runs under a Web Lock, and fresh device proofs still authenticate the session. Checked against tracker.openwebtorrent.com and tracker.webtorrent.dev with the new opt-in browser check (--tracker=<url>). Signaling v5, midnight rollover, clock skew, CSP and real-network checks remain open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
148 lines
8.4 KiB
Markdown
148 lines
8.4 KiB
Markdown
# Serverless UX roadmap
|
||
|
||
The app runs over HTTPS or on localhost. The current build uses manual signaling.
|
||
The next addition is [WebTorrent tracker reconnect](webtorrent-reconnect.md):
|
||
a configurable default or custom tracker exchanges encrypted connection codes for
|
||
paired devices, without a Trystero dependency. This replaces the custom rendezvous
|
||
proposal and the earlier blanket exclusion of a signaling backend. Peer presence,
|
||
offline wake-up and silent TURN fallback remain outside scope. An experimental
|
||
concept of reconnect works; the sections below describe the rest of the app.
|
||
|
||
## Connection workspace — implemented
|
||
|
||
The app title and connection list live in a sidebar. The first slot is **Con 1**;
|
||
users add subsequent slots explicitly and can rename them. Selecting a slot opens
|
||
its setup and transfer controls. Cached workspaces
|
||
keep live sessions and file selections intact while navigating between slots.
|
||
The sidebar collapses on mobile; network configuration is expandable.
|
||
|
||
IndexedDB stores slot names and paired devices. Transfer history, file contents,
|
||
and connection codes are not stored. Slot mutations are transactional, and other
|
||
tabs refresh their lists after changes. Storage failures show an explicit warning.
|
||
|
||
Disconnect and Reset keep the slot. Reloading ends live sessions and requires
|
||
fresh codes; a slot's paired device is authenticated by fresh signed proofs, and
|
||
setup re-reads it from storage so a device forgotten elsewhere is not trusted.
|
||
|
||
## 1. Send another file on a verified connection — implemented first
|
||
|
||
Keep the reliable data channel open after a successful receipt. The sender can
|
||
choose or drop another file without exchanging codes or confirming fingerprints
|
||
again. Require explicit receiver acceptance for each file. Reset counters,
|
||
metadata, and storage per file while retaining connection verification. Preserve
|
||
a completed memory download until the receiver accepts its replacement or resets.
|
||
Keep network settings fixed for the session; relay consent applies to that
|
||
connection until disconnect. Reset, disconnect, errors, and tab closure end
|
||
the session. Idle completed sessions remain open while both tabs remain available;
|
||
a lost connection requires fresh codes.
|
||
|
||
The first implementation negotiated repeat support within v2. Phase 2 supersedes
|
||
that compatibility path with protocol v3; both peers now need the current build.
|
||
|
||
## 2. Multiple files and transfers in either direction — implemented
|
||
|
||
Session ownership is independent of the initial Send/Receive setup choice. After
|
||
verification, Send/Receive navigates between sections while preserving the session. Both people can select or drop multiple
|
||
files and add more while transferring. Each local queue is capped at 32 including
|
||
its active outgoing file.
|
||
|
||
The arbitration decision is one sequential queue per direction, permitting two
|
||
active files total. Simultaneous offers therefore never compete for one global
|
||
slot. Monotonic odd/even IDs identify files by originating peer; control frames
|
||
and binary chunks carry these IDs. Each file uses the existing bounded window,
|
||
receive queue, receipt validation, and storage limits. The receiver accepts or
|
||
declines every file separately. Only one incoming memory file is retained.
|
||
|
||
Remove affects only a waiting local item. Decline rejects an incoming offer before
|
||
acceptance and advances the peer's queue. Disconnect cancels the whole session,
|
||
clears queues, and aborts unfinished writes in either direction. Cancellation of
|
||
an individual active file is intentionally not provided. Completed memory downloads
|
||
survive disconnect until Reset or the next acceptance.
|
||
|
||
Protocol v3 rejects old connection codes before setup. Tests cover simultaneous
|
||
queues, empty files, separate acceptance, removal, decline, stale IDs/receipts,
|
||
queue caps, storage cancellation, and verification gates. Browser checks exercise
|
||
both directions, real bytes, accessibility, and streaming downloads.
|
||
|
||
## 3. Remember trusted devices — implemented
|
||
|
||
The hosted app offers an opt-in device identity, and each connection slot can
|
||
remember one paired device. First pairing requires manual fingerprint comparison;
|
||
a slot is paired only after successful mutual verification. Later sessions on a
|
||
paired slot verify fresh signed proofs bound to both keys, both nonces, both DTLS
|
||
fingerprints, and participant roles. Slot names and saved codes never
|
||
authenticate a peer. Changed or missing identities require manual comparison and
|
||
never replace a paired device automatically.
|
||
|
||
Temporary sessions remain the default, and every file still requires acceptance.
|
||
Forgetting devices, identity deletion, storage failure
|
||
fallback, unreadable-storage recovery, and conflicting-tab write protection are
|
||
implemented. Identity-enabled signaling uses v4;
|
||
temporary connections retain v3. Browser keys remain accessible to app code.
|
||
|
||
Tests cover proof forgery and replay, altered session bindings, metadata gating,
|
||
persistence across reload, changed identities,
|
||
storage denial/recovery, and protocol-version validation. Design and review notes
|
||
are in [the device identity protocol](device-identities.md); this is not an
|
||
independent cryptographic audit.
|
||
|
||
## 4. Compressed connection codes — implemented
|
||
|
||
Offers and answers are compressed `HC1.` codes that state their type and share a
|
||
reference, so mixed-up or stale codes are rejected with a specific message.
|
||
Shareable invitation links were built on top and removed again: they did not make
|
||
real-world connections more reliable. An optional signaling backend is the
|
||
intended way to simplify the exchange.
|
||
|
||
## 5. Guided connection flow
|
||
|
||
Present one primary next action across Choose files → Share code → Connect
|
||
→ Verify → Transfer. Collapse completed setup steps, expose advanced network
|
||
settings on demand, and keep relay consent explicit. Show session state separately
|
||
from file progress. Distinguish connected, awaiting acceptance, saving, completed,
|
||
and disconnected. Provide recovery actions tailored to the actual failure.
|
||
|
||
Prefer the hosted streaming-download path when supported, retain native disk and
|
||
bounded memory fallbacks, and explain browser download completion accurately.
|
||
Use accessible focus management, keyboard controls, live status announcements,
|
||
and mobile layouts. Validate both first-time and remembered-peer paths, denied
|
||
permissions, clipboard/share fallback, browser suspension, and reconnect guidance.
|
||
|
||
## Delivery order and gates
|
||
|
||
Deliver in the order above, with a build and relevant protocol/browser checks per
|
||
phase. Small contextual UI improvements can accompany each phase. Treat identity
|
||
authentication and bidirectional framing as explicit design/review milestones.
|
||
No new persistent data or backend is needed for phase 1. Deployments are separate
|
||
from implementation; this document is the plan for the remaining phases.
|
||
|
||
## Later: peer mesh (exploratory, unscheduled)
|
||
|
||
Open HellCon tabs could assist each other so the tracker becomes a bootstrap
|
||
fallback rather than a requirement. This is an idea, not a commitment.
|
||
|
||
**Peer-relayed signaling.** WebRTC only needs a channel for offer, answer and ICE
|
||
candidates. If A has verified sessions with B and C, and B and C are paired with
|
||
each other, A can forward their reconnect exchange over its data channels. Seal
|
||
and authenticate the payloads with the B–C pairing key and bind them to the DTLS
|
||
fingerprints, so A acts only as a mailbox and cannot interpose. A relay does not
|
||
create trust: introducing unpaired devices still requires manual verification.
|
||
Fall back to the pairing's tracker or manual codes when no shared peer is open.
|
||
|
||
**Multi-source transfers.** Split a file into pieces hashed under a manifest
|
||
signed by the original sender. Any verified peer that holds pieces can serve
|
||
them; receivers check every piece against the manifest. Once one complete copy
|
||
exists, the sender may leave. Requesting only missing pieces also allows resuming
|
||
an interrupted transfer. This stays inside verified HellCon sessions: no public
|
||
swarms, no BitTorrent interoperability, and acceptance is still required per file.
|
||
|
||
**Limits.** "Online" means an open tab; browsers cannot listen in the background
|
||
and service workers cannot hold WebRTC connections, so there is still no presence
|
||
or offline wake-up. Relayed signaling does not help NAT traversal; STUN and
|
||
explicit TURN consent remain unchanged. The relay sees which of its peers connect
|
||
to each other.
|
||
|
||
**Preparation.** Keep the tracker reconnect adapter's announce/offer/answer layer
|
||
independent of the pairing logic and of its transport, so a data channel can carry
|
||
the same sealed exchange later.
|