mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
dep: Update trust-dns-resolver v0.23.0 => hickory-resolver 0.24.0 (#1467)
It's renamed to hickory-resolver. Also enabled new feature `hickory-resolver/dns-over-h3` if `rustls` is enabled. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
7e132f690d
commit
8efc19b3c3
4 changed files with 79 additions and 32 deletions
|
@ -36,8 +36,7 @@ tokio = { version = "1.28.2", features = ["macros", "rt-multi-thread", "sync", "
|
|||
tokio-tar = "0.3.0"
|
||||
tokio-util = { version = "0.7.8", features = ["io"] }
|
||||
tracing = "0.1.39"
|
||||
# trust-dns-resolver must be kept in sync with the version reqwest uses
|
||||
trust-dns-resolver = { version = "0.23.0", optional = true, features = ["dnssec-ring"] }
|
||||
hickory-resolver = { version = "0.24.0", optional = true, features = ["dnssec-ring"] }
|
||||
hyper = { version = "0.14.27", optional = true }
|
||||
once_cell = { version = "1.18.0", optional = true }
|
||||
url = "2.3.1"
|
||||
|
@ -67,20 +66,24 @@ rustls = [
|
|||
|
||||
"reqwest/rustls-tls",
|
||||
|
||||
# Enable the following features only if trust-dns-resolver is enabled.
|
||||
"trust-dns-resolver?/dns-over-rustls",
|
||||
# trust-dns-resolver currently supports https with rustls
|
||||
"trust-dns-resolver?/dns-over-https-rustls",
|
||||
"trust-dns-resolver?/dns-over-quic",
|
||||
# Enable the following features only if hickory-resolver is enabled.
|
||||
"hickory-resolver?/dns-over-rustls",
|
||||
# hickory-resolver currently supports https with rustls
|
||||
"hickory-resolver?/dns-over-https-rustls",
|
||||
"hickory-resolver?/dns-over-quic",
|
||||
"hickory-resolver?/dns-over-h3",
|
||||
]
|
||||
native-tls = [
|
||||
"__tls",
|
||||
"reqwest/native-tls",
|
||||
"trust-dns-resolver?/dns-over-native-tls",
|
||||
"hickory-resolver?/dns-over-native-tls",
|
||||
]
|
||||
|
||||
# Enable trust-dns-resolver so that features on it will also be enabled.
|
||||
trust-dns = ["trust-dns-resolver", "default-net", "ipconfig", "hyper", "once_cell"]
|
||||
# Enable hickory-resolver so that features on it will also be enabled.
|
||||
hickory-dns = ["hickory-resolver", "default-net", "ipconfig", "hyper", "once_cell"]
|
||||
|
||||
# Deprecated alias for hickory-dns, since trust-dns is renamed to hickory-dns
|
||||
trust-dns = ["hickory-dns"]
|
||||
|
||||
# Experimental HTTP/3 client, this would require `--cfg reqwest_unstable`
|
||||
# to be passed to `rustc`.
|
||||
|
|
|
@ -30,9 +30,9 @@ pub use request_builder::{Body, RequestBuilder, Response};
|
|||
mod tls_version;
|
||||
pub use tls_version::TLSVersion;
|
||||
|
||||
#[cfg(feature = "trust-dns")]
|
||||
#[cfg(feature = "hickory-dns")]
|
||||
mod resolver;
|
||||
#[cfg(feature = "trust-dns")]
|
||||
#[cfg(feature = "hickory-dns")]
|
||||
use resolver::TrustDnsResolver;
|
||||
|
||||
#[cfg(feature = "json")]
|
||||
|
@ -112,7 +112,7 @@ impl Client {
|
|||
.https_only(true)
|
||||
.tcp_nodelay(false);
|
||||
|
||||
#[cfg(feature = "trust-dns")]
|
||||
#[cfg(feature = "hickory-dns")]
|
||||
{
|
||||
builder = builder.dns_resolver(Arc::new(TrustDnsResolver::default()));
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
use std::{net::SocketAddr, sync::Arc};
|
||||
|
||||
use hickory_resolver::TokioAsyncResolver;
|
||||
use hyper::client::connect::dns::Name;
|
||||
use once_cell::sync::OnceCell;
|
||||
use reqwest::dns::{Addrs, Resolve};
|
||||
use tracing::{debug, instrument, warn};
|
||||
use trust_dns_resolver::TokioAsyncResolver;
|
||||
|
||||
#[cfg(windows)]
|
||||
use trust_dns_resolver::config::{NameServerConfig, Protocol, ResolverConfig, ResolverOpts};
|
||||
use hickory_resolver::config::{NameServerConfig, Protocol, ResolverConfig, ResolverOpts};
|
||||
|
||||
type BoxError = Box<dyn std::error::Error + Send + Sync>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue