ktr0731 / evans

Evans: more expressive universal gRPC client
MIT License
4.27k stars 188 forks source link

/etc/resolver is not respected on MacOS #632

Closed Smirl closed 1 year ago

Smirl commented 1 year ago

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 https://github.com/golang/go/issues/12524

To reproduce

  1. 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 
  2. Run evans --host myhost.com -r cli list
  3. 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

Additional context

I will raise a PR to: