Salt the tracker swarm with the clock or an own salt
The code used to be derived with a fixed salt, so a tracker could compute a table from swarm to code ahead of time, once for every share. Now the salt is the UTC 6 minute window the share was made in, and the code's new 11th character names that window, so the receiver finds it even with a clock hours off. Use own salt adds a salt both sides agree on, which nobody can guess ahead for; Generate makes a random one. The salt is locked while a tracker share or search runs, and a receiver that finds no sender is told to check the salt too. Settings are no longer kept in localStorage: a remembered list or salt that differs from the other side's would silently break shares. The core now reports when a share expires and until when it lasts, and the session owns a tracker's timers, so a socket still closing after an abort announces nothing more. Header options line up with the cards, disabled switches look disabled, and sizes, percents and times don't wrap. postcss 8.5.32. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e3a2b348d6
commit
2e47b55901
7 files changed
+462
-142
No files matched your search
@@ -2,10 +2,26 @@
|
||||
|
||||
## Ideas
|
||||
|
||||
- Unstick a wrong salt: while a tracker share or search runs, the salt is locked, and a receiver
|
||||
told "Check the code and the salt" can't change it for up to 6 minutes. The receiver doesn't need
|
||||
the lock: like the code field, the salt could stay editable and count from the next Receive
|
||||
(`saltLocked` only for `side === 'send'`). The sender does, the code shown must match the salt
|
||||
shown: a Stop button next to the valid code would end the share, unlock the salt and also let a
|
||||
share be withdrawn early. Changing the salt itself shouldn't end a share, a stray click would.
|
||||
|
||||
- Resume interrupted transfers: the receiver already reports how much the download manager has
|
||||
read (`{ read }`), which is where a new connection could continue. The browser can't append to a
|
||||
finished or failed download though, so a resume would have to start a new one.
|
||||
|
||||
- Keep user settings again: for now every reload starts from the defaults, the server lists and the
|
||||
own salt too. Open which ones to keep, and how a kept one that differs from the other side's would
|
||||
show, instead of silently breaking a share.
|
||||
|
||||
- Version the protocol for 1.0: put a version into the key derivation, e.g. `hellcon/1 <salt>` as
|
||||
the PBKDF2 salt in `secrets`. Until then any change to it silently breaks sharing between
|
||||
deployments on different versions, the receiver only sees "No sender with this code". Open how a
|
||||
mismatch would be reported, e.g. by trying the previous version's swarm too.
|
||||
|
||||
## Open observations
|
||||
|
||||
- Firefox ignores an errored service worker response stream: when the sender vanishes, the receiver
|
||||
|
||||
Reference in new issue
Block a user