Bump dep trust-dns-reslver to v0.23.0 (#1432)

* Bump dep trust-dns-reslver to v0.23.0

Since we no longer enables `reqwest/trust-dns-resolver` anymore, we
don't need to keep this dependency is sync with upstream `reqwest`.

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

* Fix compilation

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-09-30 11:12:27 +10:00 committed by GitHub
parent 8e08c65946
commit a69beccf1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 95 additions and 168 deletions

254
Cargo.lock generated
View file

@ -206,12 +206,6 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d27c3610c36aee21ce8ac510e6224498de4228ad772a171ed65643a24693a5a8" checksum = "d27c3610c36aee21ce8ac510e6224498de4228ad772a171ed65643a24693a5a8"
[[package]]
name = "base64"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]] [[package]]
name = "base64" name = "base64"
version = "0.21.4" version = "0.21.4"
@ -301,7 +295,7 @@ dependencies = [
"tokio-tar", "tokio-tar",
"tokio-util", "tokio-util",
"tracing", "tracing",
"trust-dns-resolver", "trust-dns-resolver 0.23.0",
"url", "url",
"xz2", "xz2",
"zstd 0.12.4", "zstd 0.12.4",
@ -934,6 +928,18 @@ dependencies = [
"syn 1.0.109", "syn 1.0.109",
] ]
[[package]]
name = "enum-as-inner"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.37",
]
[[package]] [[package]]
name = "equivalent" name = "equivalent"
version = "1.0.1" version = "1.0.1"
@ -1161,15 +1167,6 @@ dependencies = [
"slab", "slab",
] ]
[[package]]
name = "fxhash"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
dependencies = [
"byteorder",
]
[[package]] [[package]]
name = "generic-array" name = "generic-array"
version = "0.14.7" version = "0.14.7"
@ -1840,7 +1837,7 @@ version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95892eedefd65a6b4312aa5e166d2f740558adfb6854a2b7de73e82e54ef064c" checksum = "95892eedefd65a6b4312aa5e166d2f740558adfb6854a2b7de73e82e54ef064c"
dependencies = [ dependencies = [
"base64 0.21.4", "base64",
"bstr", "bstr",
"gix-command", "gix-command",
"gix-credentials", "gix-credentials",
@ -2000,8 +1997,8 @@ dependencies = [
"bytes", "bytes",
"futures", "futures",
"h3", "h3",
"quinn 0.10.2", "quinn",
"quinn-proto 0.10.5", "quinn-proto",
"tokio-util", "tokio-util",
] ]
@ -2122,9 +2119,9 @@ dependencies = [
"futures-util", "futures-util",
"http", "http",
"hyper", "hyper",
"rustls 0.21.7", "rustls",
"tokio", "tokio",
"tokio-rustls 0.24.1", "tokio-rustls",
] ]
[[package]] [[package]]
@ -2851,25 +2848,6 @@ version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quinn"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b435e71d9bfa0d8889927231970c51fb89c58fa63bffcab117c9c7a41e5ef8f"
dependencies = [
"bytes",
"futures-channel",
"futures-util",
"fxhash",
"quinn-proto 0.8.4",
"quinn-udp 0.1.4",
"rustls 0.20.9",
"thiserror",
"tokio",
"tracing",
"webpki",
]
[[package]] [[package]]
name = "quinn" name = "quinn"
version = "0.10.2" version = "0.10.2"
@ -2878,35 +2856,15 @@ checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75"
dependencies = [ dependencies = [
"bytes", "bytes",
"pin-project-lite", "pin-project-lite",
"quinn-proto 0.10.5", "quinn-proto",
"quinn-udp 0.4.1", "quinn-udp",
"rustc-hash", "rustc-hash",
"rustls 0.21.7", "rustls",
"thiserror", "thiserror",
"tokio", "tokio",
"tracing", "tracing",
] ]
[[package]]
name = "quinn-proto"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fce546b9688f767a57530652488420d419a8b1f44a478b451c3d1ab6d992a55"
dependencies = [
"bytes",
"fxhash",
"rand",
"ring",
"rustls 0.20.9",
"rustls-native-certs",
"rustls-pemfile 0.2.1",
"slab",
"thiserror",
"tinyvec",
"tracing",
"webpki",
]
[[package]] [[package]]
name = "quinn-proto" name = "quinn-proto"
version = "0.10.5" version = "0.10.5"
@ -2917,27 +2875,13 @@ dependencies = [
"rand", "rand",
"ring", "ring",
"rustc-hash", "rustc-hash",
"rustls 0.21.7", "rustls",
"slab", "slab",
"thiserror", "thiserror",
"tinyvec", "tinyvec",
"tracing", "tracing",
] ]
[[package]]
name = "quinn-udp"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b07946277141531aea269befd949ed16b2c85a780ba1043244eda0969e538e54"
dependencies = [
"futures-util",
"libc",
"quinn-proto 0.8.4",
"socket2 0.4.9",
"tokio",
"tracing",
]
[[package]] [[package]]
name = "quinn-udp" name = "quinn-udp"
version = "0.4.1" version = "0.4.1"
@ -3064,7 +3008,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1"
dependencies = [ dependencies = [
"async-compression 0.4.3", "async-compression 0.4.3",
"base64 0.21.4", "base64",
"bytes", "bytes",
"encoding_rs", "encoding_rs",
"futures-channel", "futures-channel",
@ -3086,24 +3030,24 @@ dependencies = [
"once_cell", "once_cell",
"percent-encoding", "percent-encoding",
"pin-project-lite", "pin-project-lite",
"quinn 0.10.2", "quinn",
"rustls 0.21.7", "rustls",
"rustls-pemfile 1.0.3", "rustls-pemfile",
"serde", "serde",
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
"tokio", "tokio",
"tokio-native-tls", "tokio-native-tls",
"tokio-rustls 0.24.1", "tokio-rustls",
"tokio-util", "tokio-util",
"tower-service", "tower-service",
"trust-dns-resolver", "trust-dns-resolver 0.22.0",
"url", "url",
"wasm-bindgen", "wasm-bindgen",
"wasm-bindgen-futures", "wasm-bindgen-futures",
"wasm-streams", "wasm-streams",
"web-sys", "web-sys",
"webpki-roots 0.25.2", "webpki-roots",
"winreg 0.50.0", "winreg 0.50.0",
] ]
@ -3166,18 +3110,6 @@ dependencies = [
"windows-sys", "windows-sys",
] ]
[[package]]
name = "rustls"
version = "0.20.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99"
dependencies = [
"log",
"ring",
"sct",
"webpki",
]
[[package]] [[package]]
name = "rustls" name = "rustls"
version = "0.21.7" version = "0.21.7"
@ -3190,34 +3122,13 @@ dependencies = [
"sct", "sct",
] ]
[[package]]
name = "rustls-native-certs"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
dependencies = [
"openssl-probe",
"rustls-pemfile 1.0.3",
"schannel",
"security-framework",
]
[[package]]
name = "rustls-pemfile"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9"
dependencies = [
"base64 0.13.1",
]
[[package]] [[package]]
name = "rustls-pemfile" name = "rustls-pemfile"
version = "1.0.3" version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2"
dependencies = [ dependencies = [
"base64 0.21.4", "base64",
] ]
[[package]] [[package]]
@ -3740,24 +3651,13 @@ dependencies = [
"tokio", "tokio",
] ]
[[package]]
name = "tokio-rustls"
version = "0.23.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
dependencies = [
"rustls 0.20.9",
"tokio",
"webpki",
]
[[package]] [[package]]
name = "tokio-rustls" name = "tokio-rustls"
version = "0.24.1" version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
dependencies = [ dependencies = [
"rustls 0.21.7", "rustls",
"tokio", "tokio",
] ]
@ -3874,6 +3774,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"log",
"pin-project-lite", "pin-project-lite",
"tracing-attributes", "tracing-attributes",
"tracing-core", "tracing-core",
@ -3941,36 +3842,61 @@ name = "trust-dns-proto"
version = "0.22.0" version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26"
dependencies = [
"async-trait",
"cfg-if",
"data-encoding",
"enum-as-inner 0.5.1",
"futures-channel",
"futures-io",
"futures-util",
"idna 0.2.3",
"ipnet",
"lazy_static",
"rand",
"smallvec",
"thiserror",
"tinyvec",
"tokio",
"tracing",
"url",
]
[[package]]
name = "trust-dns-proto"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0dc775440033cb114085f6f2437682b194fa7546466024b1037e82a48a052a69"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"bytes", "bytes",
"cfg-if", "cfg-if",
"data-encoding", "data-encoding",
"enum-as-inner", "enum-as-inner 0.6.0",
"futures-channel", "futures-channel",
"futures-io", "futures-io",
"futures-util", "futures-util",
"h2", "h2",
"http", "http",
"idna 0.2.3", "idna 0.4.0",
"ipnet", "ipnet",
"lazy_static",
"native-tls", "native-tls",
"quinn 0.8.5", "once_cell",
"quinn",
"rand", "rand",
"ring", "ring",
"rustls 0.20.9", "rustls",
"rustls-pemfile 1.0.3", "rustls-pemfile",
"rustls-webpki",
"smallvec", "smallvec",
"thiserror", "thiserror",
"tinyvec", "tinyvec",
"tokio", "tokio",
"tokio-native-tls", "tokio-native-tls",
"tokio-rustls 0.23.4", "tokio-rustls",
"tracing", "tracing",
"url", "url",
"webpki", "webpki-roots",
"webpki-roots 0.22.6",
] ]
[[package]] [[package]]
@ -3986,15 +3912,36 @@ dependencies = [
"lru-cache", "lru-cache",
"parking_lot", "parking_lot",
"resolv-conf", "resolv-conf",
"rustls 0.20.9", "smallvec",
"thiserror",
"tokio",
"tracing",
"trust-dns-proto 0.22.0",
]
[[package]]
name = "trust-dns-resolver"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dff7aed33ef3e8bf2c9966fccdfed93f93d46f432282ea875cd66faabc6ef2f"
dependencies = [
"cfg-if",
"futures-util",
"ipconfig",
"lru-cache",
"once_cell",
"parking_lot",
"rand",
"resolv-conf",
"rustls",
"smallvec", "smallvec",
"thiserror", "thiserror",
"tokio", "tokio",
"tokio-native-tls", "tokio-native-tls",
"tokio-rustls 0.23.4", "tokio-rustls",
"tracing", "tracing",
"trust-dns-proto", "trust-dns-proto 0.23.0",
"webpki-roots 0.22.6", "webpki-roots",
] ]
[[package]] [[package]]
@ -4245,25 +4192,6 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "webpki"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e"
dependencies = [
"ring",
"untrusted",
]
[[package]]
name = "webpki-roots"
version = "0.22.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
dependencies = [
"webpki",
]
[[package]] [[package]]
name = "webpki-roots" name = "webpki-roots"
version = "0.25.2" version = "0.25.2"

View file

@ -37,7 +37,7 @@ tokio-tar = "0.3.0"
tokio-util = { version = "0.7.8", features = ["io"] } tokio-util = { version = "0.7.8", features = ["io"] }
tracing = "0.1.37" tracing = "0.1.37"
# trust-dns-resolver must be kept in sync with the version reqwest uses # trust-dns-resolver must be kept in sync with the version reqwest uses
trust-dns-resolver = { version = "0.22.0", optional = true, features = ["dnssec-ring"] } trust-dns-resolver = { version = "0.23.0", optional = true, features = ["dnssec-ring"] }
hyper = { version = "0.14.27", optional = true } hyper = { version = "0.14.27", optional = true }
once_cell = { version = "1.18.0", optional = true } once_cell = { version = "1.18.0", optional = true }
url = "2.3.1" url = "2.3.1"

View file

@ -26,8 +26,7 @@ impl Resolve for TrustDnsResolver {
fn new_resolver() -> Result<TokioAsyncResolver, Box<dyn std::error::Error + Send + Sync>> { fn new_resolver() -> Result<TokioAsyncResolver, Box<dyn std::error::Error + Send + Sync>> {
#[cfg(unix)] #[cfg(unix)]
{ {
let (config, opts) = trust_dns_resolver::system_conf::read_system_conf()?; Ok(TokioAsyncResolver::tokio_from_system_conf()?)
Ok(TokioAsyncResolver::tokio(config, opts)?)
} }
#[cfg(windows)] #[cfg(windows)]
{ {
@ -52,7 +51,7 @@ fn new_resolver() -> Result<TokioAsyncResolver, Box<dyn std::error::Error + Send
socket_addr, socket_addr,
protocol, protocol,
tls_dns_name: None, tls_dns_name: None,
trust_nx_responses: false, trust_negative_responses: false,
#[cfg(feature = "rustls")] #[cfg(feature = "rustls")]
tls_config: None, tls_config: None,
bind_addr: None, bind_addr: None,
@ -60,6 +59,6 @@ fn new_resolver() -> Result<TokioAsyncResolver, Box<dyn std::error::Error + Send
} }
}); });
Ok(TokioAsyncResolver::tokio(config, opts)?) Ok(TokioAsyncResolver::tokio(config, opts))
} }
} }