Skip to content

Record --interface as ROADMAP item 25, gated on a sendspin-cpp bind address - #39

Merged
chrisuthe merged 1 commit into
mainfrom
chrisuthe/task/record-interface-as-roadmap-item-25-blocked-on-a
Aug 28, 2026
Merged

chrisuthe merged 1 commit into
mainfrom
chrisuthe/task/record-interface-as-roadmap-item-25-blocked-on-a

Conversation

@chrisuthe

Copy link
Copy Markdown
Member

Docs-only. Evaluates the --interface request and records the outcome as ROADMAP item 25 rather than shipping a half of it.

The flag cannot be built against the pinned library. At v0.7.2 — the newest tag — the listener is constructed with a literal "0.0.0.0" in src/host/ws_server.cpp, and SendspinClientConfig carries server_port and server_max_connections and nothing else about the socket. SendspinWsServer exposes only connection callbacks, so there is no seam the CLI can reach around it. The item is gated on a SENDSPIN_GIT_TAG bump, the same treatment item 17 gets.

Why it is worth recording rather than deferring. The pinned library has no inbound authentication at all — no PSK, no pairing gate, and no activities/server/activate — so reachability is authorization, and a bind address would be the only such control the player itself offers. Kept in proportion: NAT covers most installs, the real cases are multi-homed hosts, VPSes, tunnels and untrusted VLANs, and a host firewall is named as the working mitigation today.

Two parity corrections, verified. The Python CLI's --interface is address-valued, not an interface name (sendspin/cli.py:475, daemon/daemon.py:212), and it does not scope the mDNS advertisement to that address — ClientListener._start_mdns() builds a bare AsyncZeroconf() and takes its address from get_local_ip(), an 8.8.8.8 route lookup. Checked at aiosendspin 6.0.1, the version sendspin-python-cli pins, and unchanged at 9.1.0. What Python scopes locally is the browse (sendspin/discovery.py:150), which is the outbound path.

The flag, settled. --interface <name-or-address> (config key interface, long-only) — a deliberate superset of Python's address-only flag, because the bind needs an address while DNSServiceRegister needs an index, and a name is what an operator on a Pi knows. Validated in the two stages item 24 established: shape at parse time so a config file is checked without touching the host, resolution at startup where the interfaces are real — so interface = eth0 on a Pi that has not got its lease yet fails where a device failure is reported, not from inside the parser.

The item also records why the mDNS half is not shippable alone: scoping the advertisement while the socket still listens on 0.0.0.0 is a discovery-correctness fix, not access control, and must not ship wearing this flag's name.

Closes #36

Testing

ctest: 399/401. The two failures (ParseOptions.ARelativeControlSocketIsMadeAbsoluteUnderZ, ConfigMerge.AConfiguredControlSocketIsAbsolutizedUnderDaemonize) are the 103-byte sun_path limit against this worktree's long path — the error text names 104 and 108 bytes — and both pass when the same binary runs from a shorter cwd. The diff touches docs/ROADMAP.md only, so no test is affected.

…ddress

The flag cannot be built against the pinned library: the listener is
constructed with a literal "0.0.0.0" and SendspinClientConfig carries no
bind-address field. Item 25 settles the design and the evidence so neither
has to be re-derived when upstream moves.

It corrects two parity claims commonly made about the Python CLI, both
checked against the pinned aiosendspin 6.0.1: its --interface is
address-valued rather than an interface name, and it does not scope the
mDNS advertisement to that address -- what it scopes locally is the browse.

The flag is settled as --interface <name-or-address>, validated in the two
stages item 24 established: shape at parse time, resolution at startup,
since an interface name depends on live host state.
@chrisuthe
chrisuthe marked this pull request as ready for review August 28, 2026 16:30
@chrisuthe
chrisuthe merged commit 1759d11 into main Aug 28, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--interface: bind the inbound WebSocket listener and mDNS to one interface

1 participant