mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #3278] [MERGED] Get Android's DNS servers #3706
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#3706
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?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/3278
Author: @LAGonauta
Created: 9/25/2025
Status: ✅ Merged
Merged: 9/27/2025
Merged by: @djc
Base:
main← Head:android-dns-servers📝 Commits (1)
d92f43bAdd support for getting DNS servers from the Android system📊 Changes
9 files changed (+513 additions, -116 deletions)
View changed files
📝
Cargo.lock(+9 -0)📝
Cargo.toml(+3 -1)📝
conformance/Cargo.lock(+230 -110)📝
crates/proto/Cargo.toml(+3 -0)📝
crates/proto/src/error.rs(+12 -0)📝
crates/resolver/Cargo.toml(+5 -1)➕
crates/resolver/src/system_conf/android.rs(+86 -0)📝
crates/resolver/src/system_conf/mod.rs(+10 -2)📝
fuzz/Cargo.lock(+155 -2)📄 Description
This PR should resolve #652.
I am developing an app with Slint. It uses a library that relies on hickory to make some DNS requests, such as SRV requests.
However, I want to build for both desktop and Android. While I could modify the library to accept a custom config with the DNS servers, modifying hickory itself seems the better solution.
This PR adds code to call Android APIs through JNI to get the servers, and should work from Marshmallow (6.0, API level 23) onward. I tested on Android 13, but I will test on Android 6.0 soon.
This is my first time contributing to a library like hickory, so please forgive me if my code is not easy to follow. JNI can be quite confusing, so I added a comment with the Android reference for each call.
Feel free to ask me any questions, or to request any changes.
Thanks, and I hope we can get this into hickory!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.