Fix macOS Hack DNS target - #17
Closed
paulkarcher wants to merge 1 commit into
Closed
Conversation
|
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.
Summary
127.0.0.1only when the host cannot route to172.30.0.2:443hack doctor --fixand the install guidance with the same reachability-based decisionRoot cause
Hack intentionally uses the fixed
hack-devingress addresses so host DNS can bypass flaky localhost port-forwarding paths and resolve directly to global ingress. That works on many setups, but some macOS environments cannot route host traffic to the Docker bridge address172.30.0.2, so requests tohttps://*.hackhang even though Caddy is healthy.The fix here is not to globally revert macOS back to localhost. Instead,
hack global installand the doctor repair path now probe the environment and choose the host DNS target that is actually reachable on that machine.Behavior
172.30.0.2:443is reachable from the host, macOSdnsmasqkeeps pointing*.hackand*.hack.gyat172.30.0.2dnsmasqpoints those domains at127.0.0.1hack global installorhack doctor --fixValidation
bun test tests/doctor-utils.test.ts tests/coredns-config.test.ts tests/global-command.test.ts tests/global-command.macos.test.tsbun run --cwd packages/cli test172.30.0.2:443is reachable from the host still keeps.hackresolving to172.30.0.2