mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 19:25:56 +03:00
[GH-ISSUE #2836] 'hosts' doesn't seem to work #1070
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#1070
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 @ryoii on GitHub (Mar 10, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2836
I want to use the built-in 'hosts' to handle some DNS requests. I try like this
It returns an error
proto error: no connections availablewhile callinglookup_ip.Once I set a doh server
let dns_ips = vec![dns_name.parse()?];, It works but doesn't return0.0.0.0as I expected.Library version
hickory-resolver = { version = "0.25.0-alpha.5", features = ["dns-over-rustls", "dns-over-https-rustls"]}@djc commented on GitHub (Mar 10, 2025):
Your example configures 0 IP addresses for the
NameServerConfigGroupso it's not surprising that the resolver is unable to make a connection. Do you want to argue that an empty config group should still be able to resolve names that are configured in the hosts file, without even trying DNS queries?@ryoii commented on GitHub (Mar 10, 2025):
Sure, if the hosts file can provide query results, shouldn't the request for the dns service be send?
But, as I said, even if I provide the IP address for the
NameServerConfigGroupIt also won't return
0.0.0.0as I was expected.@djc commented on GitHub (Mar 10, 2025):
This appears to be a regression introduced with #2560 -- should be fixed in #2839. Thanks for the clear reproduction!
@ryoii commented on GitHub (Mar 11, 2025):
According to #2839
Using root domain can work around.