Commit e51b931
committed
fix: avoid macOS mDNS 5s delay on .local hosts entries
If applied, this commit will make the documented /etc/hosts lines for
the core and stepup environments resolve instantly on macOS instead
of taking ~5 seconds per fresh hostname lookup.
Why is this change needed?
Prior to this change, the /etc/hosts lines had the IP address
followed directly by a real hostname. On macOS, any .local hostname
looked up this way is first tried via multicast DNS (Bonjour), which
times out after ~5 seconds before falling back to /etc/hosts --
regardless of the entry being present. A typical login flow crosses
several *.dev.openconext.local subdomains in sequence, so this tax
stacks up to several seconds per redirect hop.
How does it address the issue?
Adds a throwaway alias word ("oc1"/"oc2") directly after the IP
address on each affected line. A word in that position is enough to
make macOS treat the line as a normal /etc/hosts entry and skip the
mDNS attempt, cutting resolution to milliseconds. Updates both
README.md files and the line init.sh prints during setup, with a
short comment explaining why the leading word is there.
Links / references:
https://www.peterbe.com/plog/make-.local-domains-not-slow-in-macos1 parent c7dc2ce commit e51b931
3 files changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
0 commit comments