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:
1 parent
a5935a8324
commit
3659956967
17 files changed
+930
-28
No files matched your search
@@ -217,7 +217,9 @@ img-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'none';
|
||||
frame-ancestors 'none'
|
||||
```
|
||||
|
||||
Inline styles are used for progress and Vue visibility. Custom policies must
|
||||
Inline styles are used for progress and Vue visibility. The experimental
|
||||
tracker reconnect also needs the tracker in `connect-src`, for example
|
||||
`connect-src 'self' wss://tracker.example`. Custom policies must
|
||||
permit same-origin workers and frames. Test headers on the actual host; CSP is
|
||||
defense in depth, not a substitute for trusting the host or a WebRTC egress
|
||||
filter. `robots.txt` and indexing metadata are crawler requests, not access
|
||||
@@ -245,6 +247,7 @@ bun run test # unit tests
|
||||
bun run build
|
||||
bun run test:browser # Chromium integration and axe checks against dist/
|
||||
bun run test:browser --connections # sidebar, persistence, live switching, mobile layout
|
||||
bun run test:browser --tracker=wss://tracker.example # experimental tracker reconnect
|
||||
bun run test:download # real hosted downloads up to 120 MiB, no native picker
|
||||
bun run test:cross-browser # Brave sender → Firefox receiver
|
||||
bun audit
|
||||
|
||||
Reference in new issue
Block a user