You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
One listen socket per resolved address: --host tailnet,lan and custom lists #6
Spec: #1 — Exposure as a set of listen interfaces (bind-hosts lane). Governing ADR: 0003.
What to build
The server opens one listen socket per resolved address, under both runtimes (Electron-as-Node for the desktop backend, Bun for bun dev). Nothing binds a wildcard unless the legacy 0.0.0.0 / :: form was explicitly requested. The temporary "first address + warning" behaviour from the tracer ticket is removed.
Runtime state lists every bound address plus resolver warnings; consumers that need one URL take the first. An explicit address absent from the machine is skipped with a warning naming it; the rest bind.
Preferred mechanism per ADR 0003: one HTTP server instance with one listener per address. Escape hatch, only if the HTTP server layer cannot be instantiated once per address: bind 0.0.0.0 and close any connection whose socket.localAddress is not in the resolved set — and update ADR 0003 in the same commit.
Demo:t3 serve --host tailnet,lan → both addresses accept; [::1] refused.
Acceptance criteria
Seam 1: {loopback, lan} with lan injected as the runner's real first non-internal IPv4 → both addresses accept; policy remote-reachable. If the runner has no such address the case skips with a message rather than faking one.
Seam 1: {loopback} → [::1] refused (no dual-stack wildcard).
Seam 1: an explicit address not in the injected map → skipped, warning names it, the remaining addresses accept.
Seam 1: legacy --host 0.0.0.0 → a single wildcard listener.
Every Seam 1 case passes identically whether the preferred mechanism or the escape hatch is used.
Both runtimes verified — the CI runtime automatically, the other at least manually; the PR states which.
Runtime state and startup output list all bound addresses; t3 pair picks the first non-loopback.
Graceful shutdown closes every listener; existing shutdown tests stay green.
If the escape hatch was taken, ADR 0003 records it in the same commit.
Pinned from #5: while single-socket, --host tailnet binds the tailnet address and not loopback (interim recorded in ADR 0003). This ticket must restore ADR 0003's rule: loopback is bound alongside every selected interface, and the Seam 1 case {loopback, tailnet} (injected map) must show 127.0.0.1 accepting as well as the tailnet address. Remove the interim paragraph from ADR 0003 in the same PR.
Activity
t3 serve --host tailnetbinds the tailnet address only #5Khang5687 commentedon Sep 15, 2026
Pinned from #5: while single-socket,
--host tailnetbinds the tailnet address and not loopback (interim recorded in ADR 0003). This ticket must restore ADR 0003's rule: loopback is bound alongside every selected interface, and the Seam 1 case{loopback, tailnet}(injected map) must show127.0.0.1accepting as well as the tailnet address. Remove the interim paragraph from ADR 0003 in the same PR.Merge pull request #13 from Khang5687/feat/multi-bind
Khang5687 commentedon Sep 16, 2026
Merged into fork-main via #13. Loopback bound alongside every selected interface; interim paragraph removed from ADR 0003.