dep: Bump hickory-resolver to 0.25.1 (#2096)

* dep: Bump hickory-resolver to 0.25.0

Fix #2089 

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix use of hickory-resolver features

And bump hickory-resolver to 0.25.1

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Update lockfile and bump transitive dependencies

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix use of hickory-dns updated API

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2025-03-19 23:33:44 +10:00 committed by GitHub
parent d8ecdcaeec
commit ce998d1af4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 180 additions and 97 deletions

View file

@ -63,7 +63,7 @@ tokio = { version = "1.44.0", features = [
tokio-tar = "0.3.0"
tokio-util = { version = "0.7.8", features = ["io"] }
tracing = "0.1.39"
hickory-resolver = { version = "=0.25.0-alpha.5", optional = true, features = [
hickory-resolver = { version = "0.25.1", optional = true, features = [
"dnssec-ring",
] }
once_cell = { version = "1.18.0", optional = true }
@ -104,11 +104,11 @@ rustls = [
"reqwest/rustls-tls-native-roots",
# Enable the following features only if hickory-resolver is enabled.
"hickory-resolver?/dns-over-rustls",
"hickory-resolver?/tls-ring",
# hickory-resolver currently supports https with rustls
"hickory-resolver?/dns-over-https-rustls",
"hickory-resolver?/dns-over-quic",
"hickory-resolver?/dns-over-h3",
"hickory-resolver?/https-ring",
"hickory-resolver?/quic-ring",
"hickory-resolver?/h3-ring",
]
native-tls = ["__tls", "native-tls-crate", "reqwest/native-tls"]

View file

@ -65,7 +65,9 @@ fn new_resolver() -> Result<TokioAsyncResolver, BoxError> {
debug!("Resolver configuration complete");
opts.ip_strategy = LookupIpStrategy::Ipv4AndIpv6;
Ok(TokioAsyncResolver::tokio(config, opts))
let mut builder = TokioAsyncResolver::builder_with_config(config, Default::default());
*builder.options_mut() = opts;
Ok(builder.build())
}
#[cfg(windows)]