Skip to content

mdns: refuse a dedicated status-page port under the service edge - #72

Merged
shreeve merged 1 commit into
mainfrom
mdns/split
Oct 11, 2026
Merged

shreeve merged 1 commit into
mainfrom
mdns/split

Conversation

@shreeve

@shreeve shreeve commented Oct 11, 2026

Copy link
Copy Markdown
Owner

The status-page half of #67, without the IPv4-only wan change. That change bound wan to 0.0.0.0, and Go opens that as a dual-stack socket. On Linux the exposure watch would then stop the edge in a loop, even on a host with IPv6 enabled but no global address, which is how the live host is set up. The strict tcp4/0.0.0.0 bind breaks the ACME challenge listener instead, because Caddy copies the bind address into bind_host verbatim. So wan keeps main's behaviour.

Change

mdns { listen :7680 } gives the status page a dedicated listener on all addresses. An exposure mode governs only ports 80 and 443 (the macOS pf rule and the socket watch), so under the service edge that listener would serve the status page outside the mode, on any address the host has. Once the service edge has published a mode, a listen is now a Start error that names the mode, and the front door shares the HTTP port, as the seed configures it. Dedicated mode stays available to a hand-run Caddyfile (development, CI, the root Caddyfile), which has no exposure contract.

Tests

  • TestMdnsDedicatedFrontDoorRefusedUnderTheServiceEdge covers localhost, lan, and wan.
  • make test: unit suites pass and acceptance passes 174/174 in the foreground.

Supersedes #67.

@shreeve
shreeve merged commit 9f56b1a into main Oct 11, 2026
4 checks passed
@shreeve
shreeve deleted the mdns/split branch October 11, 2026 13:42
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.

1 participant