Files
magpie/docs
yetone 18a9a2d883 remote magpie: a remote that can't be reached is not looked for on the network, which sent its key to every neighbour
fe61503e6 had a Remote magpie whose address didn't dial look for it on the
old address's /24 and this computer's own private /24s. It sent GET
/v1/models, signed with the provider's gateway key (Authorization and
x-api-key, plus custom headers), to every address that took a connection
at the port, and saved the first that listed 200. On a café's or hotel's
network, or with the other computer just off, anyone listening at :3425
got the other magpie's key in clear. By answering {"data":[]} they
became the provider, so the failed request and every later one (prompts,
files) went to them, and they could hand back tool calls.

seekAt now looks nowhere. A remote that can't be reached fails as it did
before fe61503e6, and the user types the new address. lanNeighbours stays
for the real fix, in which an address proves it holds the key before the
key is sent to it (being written now). Tests still look where SeekHere
says. The providers-accounts page says the look is off and why.

Run on mote at this tree (base 06c4582cc): gofmt -l internal/provider
clean; go vet ./internal/provider; go test -tags nogui -count=1 -run
'RemoteMagpie|Neighbour|Moved' ./internal/provider ./internal/gateway ok.

Broken by hand: seekAt = lanNeighbours again turns
TestRemoteMagpieKeyGoesToNoNeighbour red (506 addresses looked at for
192.168.77.20).

Not tried: the full suite, or Windows and Linux beyond what this one-line
change needs.
2026-11-06 21:06:48 +08:00
..