How can I specify DNS Resolver as environment variable or command line argument #1393
Labels
Priority: Normal
Minor issue impacting one or more users
Type: Feature Request
A big idea that would be split into smaller pieces
*Describe the feature you'd like
As the title, because
cloudflared
uses go dns resolver, it looks for/etc/resolv.conf
(for linux binaries) when try to resolve domains - which not the case on Android systems.If it doen't find that file, it sets the default name server to
localhost:53
https://github.com/golang/go/blob/e335a2665f5e322a7da8baa22fe816b6ef9aaf24/src/net/dnsconfig.go#L14
Which cause problems as here:
There's a few possible solutions:
/etc/resolv.conf
file/etc/hosts
for our domainnscloudflared
. If we build a binary linked to libc it will use that to do name resolution which will probably fix this issue.The first two require the device/emulator to be rooted.
The third one is too annoying because
cloudflared
is constantly updated, and adding a release build/fork for this is waste time.Describe alternatives you've considered
Are there any alternatives to solving this problem? If so, what was your experience with them?
I think environment variable or command line argument is the best way in a scripting context.
The text was updated successfully, but these errors were encountered: