/etc/resolver is not respected on MacOS
Smirl opened this issue · comments
Alex Williams commented
Describe the bug
Until recently, /etc/resolver/
was not respected by golang's built in DNS resolver. (background on custom resolvers)
This was recently fixed in golang 1.20. See golang/go#12524
To reproduce
- Create a file in
/etc/resolver/myhost.com
with content (can change the ip address to your custom DNS, etc):
nameserver 8.8.8.8
- Run
evans --host myhost.com -r cli list
- See that it doesn't use the custom DNS server (NXDOMAIN if the DNS resolver is required, for example).
Expected behavior
evans
binaries distributed by the standard methods (brew, etc.) are built with CGO_ENABLED=0
. They should respect the /etc/resolver
DNS settings.
Environment
- OS: MacOS only
- Terminal: zsh
- Evans version:
v0.10.9
protoc
version: N/Aprotoc
plugin version (if you are using): N/A
Additional context
I will raise a PR to:
- upgrade to golang 1.20
- run a
go mod tidy
for good measure - Shouldn't be an issue for most users as it doesn't matter what version of go is used to compile the binary