Add experimental tracker reconnect for paired devices

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>
This commit is contained in:
SchluffeandClaude Opus 5.5 committed 2026-10-20 20:51:05 +02:00
1 parent a5935a8324
commit 3659956967
17 files changed
+930 -28

No files matched your search

+2
View File
@@ -330,6 +330,8 @@ summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input[type=file] { max-width: 100%; font-size: 0.8rem; }
input[type=file]::file-selector-button { border: 1px solid #505667; border-radius: 6px; padding: 0.45rem 0.65rem; margin-right: 0.6rem; background: #242a36; color: var(--text); cursor: pointer; }
.session-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.reconnect-setup { display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; border-top: 1px solid var(--border); padding-top: var(--space-md); }
.reconnect-setup .status { margin: 0; line-height: 1.6; }
.session-actions button { font-size: 0.88rem; }
.storage-error { color: #ffb4a9; background: #422725; border: 1px solid #8e5147; border-radius: 8px; padding: 1rem; font-size: 0.85rem; line-height: 1.6; }
.mobile-bar { display: none; }