Version the protocol for 1.0, fail downloads the page abandoned
PROTOCOL (hellcon/1) goes in front of the PBKDF2 salt and names the data channel, so different versions never meet via a tracker and the manual receiver tells a sender on another protocol apart. The footer shows it, the receiver's hints ask to compare it. Forks are asked to name their own. public/sw.js and the page exchange a VERSION, a mismatch fails the download with outdated. The worker fails a download after 20 s without a chunk or ping from its page, else Firefox saves the truncated file of a closed tab as complete. The build uses relative links and works under any path. On https only wss: trackers and ws: to this device are accepted, one the browser refuses to open counts as lost. Also: a file read short stops the transfer, an offer waiting on a lost tracker isn't answered, a share ended while its key was derived opens no tracker, and tracker and receiver errors lose hidden characters. The README lists what isn't planned and the phone limitation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
44a8a72261
commit
ac4d496a48
11 files changed
+399
-56
No files matched your search
@@ -10,11 +10,6 @@
|
||||
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.
|
||||
|
||||
- Revisit the screen wake lock: a browser that keeps refusing it (e.g. in a power saving mode) logs
|
||||
"screen may lock" each time the page is visible again, open whether once per session is enough.
|
||||
`awake: …` doesn't cover a session that ends in an error, nor one that ends while a request is
|
||||
@@ -22,6 +17,11 @@
|
||||
|
||||
## Open observations
|
||||
|
||||
- A phone can't send in the background: with Brave on Android (Pixel), the connection is lost as
|
||||
soon as the sender's page goes to the background. Receiving survives it, likely because the
|
||||
browser's download manager runs as a foreground service while the file streams into it. The wake
|
||||
lock only keeps the screen from timing out, the sender's page has to stay in front.
|
||||
|
||||
- Firefox ignores an errored service worker response stream: when the sender vanishes, the receiver
|
||||
logs "download failed: connection lost", but the download stays "in progress" until the user
|
||||
cancels it. Closing the stream instead is worse, Firefox then reports the truncated file as
|
||||
|
||||
Reference in new issue
Block a user