mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #3295] DNS EDNS Client Subnet (ECS) - RFC7871 #1163
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#1163
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 @brr53 on GitHub (Oct 2, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/3295
Is your feature request related to a problem? Please describe.
DNS answers always reflect the resolver’s location, not the subnet I need to test from, making CDN/GSLB testing inaccurate.
Describe the solution you'd like
Support EDNS Client Subnet (ECS) so I can send queries “as if” from a given subnet (e.g. 1.1.1.1/32) to reproduce region-specific answers.
In cURL we do it like: dig @1.1.1.1 www.example.com A +subnet=198.51.100.0/24
Describe alternatives you've considered
Workarounds include spinning up VMs in target regions or relying on custom resolvers.
Additional context
This enables accurate CDN edge validation, incident triage, and geo-routing tests without extra infrastructure.
@djc commented on GitHub (Oct 6, 2025):
Which API do you need this for? What are you trying to do exactly?
There is some basic infrastructure for this --
hickory_proto::rr::rdata::opt::ClientSubnet, which you can add out to going messages by usingMessage::set_edns().Though note this part of the RFC:
So any implementation to do more with this should be opt-in.
@brr53 commented on GitHub (Oct 6, 2025):
Thank you @djc
We want to use it via settings in ResolverOpts from our client application. We use ResolverOpts with TokioResolver.
For globally available applications, we want to test and make sure that our clients are given the intended/correct edge IP addresses when connecting to our servers. Testing via Client Subnet is much more preferable than setting up temporary servers around the world to test this.
There are many other use usecases also such as censorship resistance (resolving to a foreign, unfiltered, unbiased server)
Using Message directly appears to require much manual handling and not let us use the built-in caching features.
Of course, the default works fine for most people. Regarding privacy, Google DNS enforces the smallest subnet size to be a /24 to prevent the exact IP address from being sent. With Hickory, we'd ideally pass the subnet as a string and have direct control & knowledge.
@bluejekyll commented on GitHub (Oct 7, 2025):
Previous discussions and issues in this area: #1924, #350