home-assistant / plugin-dns

CoreDNS implementation for Home Assistant
Apache License 2.0
19 stars 14 forks source link

Don't hard-code upstream DNS resolvers #53

Closed blalor closed 3 years ago

blalor commented 3 years ago

Applications should not hard-code their own DNS resolvers; they should use the configuration provided by the network (via DHCP) or by the user, perhaps with an overridable default if no other option exists. This is an anti-pattern: https://github.com/home-assistant/plugin-dns/blob/be7b7e7fc4460ef31483882e743ba4e3b62fe8c4/rootfs/usr/share/tempio/corefile#L30

frenck commented 3 years ago

This has been discussed in various places in the past.

https://github.com/home-assistant/plugin-dns/issues/22#issuecomment-769916961

The project is not changing this.

vistalba commented 2 years ago

Would it be possible to make it configurable so that advanced users could disable this behavior? I do not want to start a fundamental discussion, as I read a lot and I see that there are two or more views to this point.

But what is the technical reason not doing so? I'm happy to support with that but unfortunately I do not have any experience in coding so I'm not able to raise a pull request.

Maybe some config in customize.yaml like would be possible:

dns-fallback: false

or

dns-fallback: true
dns-fallback-servers: tls://8.8.8.8

if nothing is configured in customize.yaml use the behavior like now.