mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[GH-ISSUE #1707] Option to use different hostnames for different nameservers. #741
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#741
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kevincox on GitHub (May 12, 2022).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1707
Is your feature request related to a problem? Please describe.
Right now you can only provide one
TlsClientConfigfor all of your nameservers. But for example if you want to allow failover between to different hosts (for example Cloudflare and Google) there is no single correct value to use.Describe the solution you'd like
It should be possible to have a different
TlsClientConfigper host used for DNS.@bluejekyll commented on GitHub (May 12, 2022):
When you say "there is no single correct value to use", what do you mean exactly? The default TlsClientConfig should work for both of them?
@djc commented on GitHub (May 12, 2022):
(In other words: can you talk more about the problem you're running into/the use case you have for this, rather than talking about a proposed solution?)
@bluejekyll commented on GitHub (May 12, 2022):
Thanks, @djc, my questions came off a little short.
Overall, I don’t mind a feature like this, I’m just trying to figure out what the use cases are that we’d be trying to account for.
@djc commented on GitHub (May 12, 2022):
Didn't mean to suggest your quetsions came off short -- I think they're good suggestions. I just think it's generally useful to bring back reports like these back to the actual issue to avoid XY problems.
@kevincox commented on GitHub (May 13, 2022):
I'll try to rephrase. For redundancy I would like to use two resolvers in my app. For example Google and Cloudflare using DoH. However these have different DNS domains to validate against. For Google I need to use
dns.googleand for Cloudflare I need to usecloudflare-dns.com. However the constructor only allows me to provide a single hostname for all resolver IPs as far as I can tell.What I would like to say is: Use
8.8.8.8and8.8.4.4with thedns.googlehostname in addition to1.1.1.1and1.0.0.1with thecloudflare-dns.comhostname.A slightly weaker solution would be to provide multiple valid hostnames which would be effectively the same since you trust those two certs anyways.
@bluejekyll commented on GitHub (May 13, 2022):
Can you point to which constructor you mean? We should clean up the docs in this area, but each should get it's own
NameServerConfigand those should have the associatedtls_dns_name, and can optionally carry atls_config. You can see examples for the default configuration for cloudflare here:github.com/bluejekyll/trust-dns@df82c60b34/crates/resolver/src/config.rs (L598-L609)Once you have the google and cloudflare ones created they can be combined with a
NameServerPoolto perform queries against both.@kevincox commented on GitHub (May 13, 2022):
Oh, this is just user error. I was getting confused with
trust_dns_resolver::config::NameServerConfigGroupand the fact thattrust_dns_resolver::config::ResolverConfig::from_parts()takes anInto<NameServerConfigGroup>. I also thought that theTlsClientConfigisn't actually what held the domain name to validate against. I missed that you can usetrust_dns_resolver::config::ResolverConfig::add_name_server()to then add extratrust_dns_resolver::config::NameServerConfigs. It is a bit awkward if you want to use the built-in helpers but for using Google and Cloudflare like the example the following code appears to work. You can also add arbitrary resolvers by creating your ownNameServerConfig.Hope this helps someone equally confused in the future.