Repository navigation
mdns: refuse a dedicated status-page port under the service edge - #72
Merged
Merged
Conversation
…e governs ports 80 and 443 alone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 stricttcp4/0.0.0.0bind breaks the ACME challenge listener instead, because Caddy copies the bind address intobind_hostverbatim. So wan keepsmain'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, alistenis 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 rootCaddyfile), which has no exposure contract.Tests
TestMdnsDedicatedFrontDoorRefusedUnderTheServiceEdgecovers localhost, lan, and wan.make test: unit suites pass and acceptance passes 174/174 in the foreground.Supersedes #67.