Repository navigation
v0.0.22 — Two bugs that only another implementation could find
v0.0.22 — Two bugs that only another implementation could find
Every test until now put zapsend on both ends. That proves the code agrees with
itself, which is not the same as speaking the protocol. So this release was
checked against lsq, a Rust LocalSend client written by someone else
(AlexDevFlow/lsq), in all three
directions. Two real bugs fell out on the first run.
1. The port you asked for was thrown away
zapsend send file.bin --ip 127.0.0.1:53320
# sending 2 file(s) to "lsq-recv" (127.0.0.1:53317) ← not the port given
# tcp connect error: Connection refusedAfter /info, the client copied the port the peer announced over the port it
had just successfully connected to. When those differ, the announced port is the
one thing not proven to work. It now keeps the address that answered; the
announced port is ignored. Same fix in pull and trust.
Our own receiver announces its real port, so nothing we wrote could ever have
caught this.
2. pull could not talk to a peer serving the Download API over HTTP
error: received corrupt message of type InvalidContentType
lsq share serves its downloads over plain HTTP. send already retried on the
other scheme when the TLS handshake failed; pull did not. It does now, and the
retry sticks for the downloads that follow.
pulling 2 file(s) from "lsq-share" into out-c
{"ok":true,"count":2,"transferred":2000014}
Interop is now a test, not a claim
tests/interop-lsq.sh downloads that binary and checks three directions with
SHA-256 on both ends — 11 checks:
| direction | who is on the other side |
|---|---|
zapsend send → lsq receive |
their receiver, our sender |
lsq send → zapsend receive |
their sender, our receiver |
zapsend pull ← lsq share |
their Download API, our client |
README told two lies, both fixed
- "Nobody filled that slot. Zapsend does." — false.
localsend-rs,lsq,
lsend-cliandlocalsndall exist. The README now names them, says to pick
one of them for a single transfer, and argues only for the fleet case. - "No resume yet: a dropped connection means starting over." — stale since
v0.0.14. Replaced with the limits that are true:synccannot replace a file,
andsyncneeds a zapsend receiver.
Verified
- Windows build on WinPE 10.0.26100.1742:
sendto a non-default port
10.0.2.2:53485(5,000,000 B, exit 0) andpullfrom it (2 files,
transferred:1000018, exit 0) — the exact shape of bug 1. - VPS → sandbox, 20 MB, over a real TCP hop (ssh tunnel; the sandbox is not
routable), SHA-256 identical on both machines. - Suites: 15 unit, 31 compat, 28 json, 25 pull-resume, 29 hosts, 19 pull, 17
resume, 52 fan-out, 25 sync, 11 interop.