Files
magpie/docs
yetone e855272cf0 gui: a refused allow list names the address magpie sees the page from, with Add <addr> (Mathresearcher)
Settings > Share on local network > Allowed addresses refused a list that
would shut out the page itself with a fixed sentence and no address
(Mathresearcher on Discord). The server already names it (KeepsOut in
gateway/allow.go, "that allow list would shut out <addr>, the address
this page is open from"); allowSays now carries it into the message in
every language, and a one-click "Add <addr>" button saves the list with
it added.

The address is the connection's own (peerAddr: RemoteAddr, unmapped, zone
dropped); X-Forwarded-For and the like are never trusted, and loopback and
the machine's own addresses always pass. Behind Docker Desktop or rootless
Docker every client shows as Docker's own address (192.168.65.x), the host
reaching a container shows as the bridge gateway (172.17.0.1), and a proxy
in another container shows as that container. So the button's tooltip
says that behind Docker or a reverse proxy this is the proxy's address,
and adding it lets in everyone who comes through that proxy.

Run:
- allow-ips.test.cjs, chromium and webkit: 14 pass. The subtest checks
  the refusal names 203.0.113.50, the button's text and tooltip fit,
  a click posts ["172.16.0.0/12","203.0.113.50"], lists the rows, takes
  the button away and doesn't scroll. With the old app.js put back it
  fails (TimeoutError; chromium 5 pass, 2 fail).
- gui-de, gui-ja, gui-zh-tw, i18n-keys: 12 pass.
- gofmt -l (clean), go vet darwin, GOOS=linux -tags nogui, GOOS=windows:
  clean. go test -tags nogui ./internal/gui -run Allow: ok.
Not tried: a real Docker or reverse-proxy setup.
2026-10-14 09:31:01 +08:00
..