trust_dns_resolver is now hickory_resolver (#116)

This commit is contained in:
Ferdinand Schober
2024-04-26 22:52:00 +02:00
committed by GitHub
parent 3e96b42067
commit 636c5924bf
3 changed files with 48 additions and 49 deletions

93
Cargo.lock generated
View File

@@ -1131,6 +1131,51 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
name = "hickory-proto"
version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512"
dependencies = [
"async-trait",
"cfg-if",
"data-encoding",
"enum-as-inner",
"futures-channel",
"futures-io",
"futures-util",
"idna 0.4.0",
"ipnet",
"once_cell",
"rand",
"thiserror",
"tinyvec",
"tokio",
"tracing",
"url",
]
[[package]]
name = "hickory-resolver"
version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243"
dependencies = [
"cfg-if",
"futures-util",
"hickory-proto",
"ipconfig",
"lru-cache",
"once_cell",
"parking_lot",
"rand",
"resolv-conf",
"smallvec",
"thiserror",
"tokio",
"tracing",
]
[[package]]
name = "hostname"
version = "0.3.1"
@@ -1252,6 +1297,7 @@ dependencies = [
"futures-core",
"glib-build-tools",
"gtk4",
"hickory-resolver",
"hostname 0.4.0",
"keycode",
"libadwaita",
@@ -1267,7 +1313,6 @@ dependencies = [
"tempfile",
"tokio",
"toml",
"trust-dns-resolver",
"wayland-client",
"wayland-protocols",
"wayland-protocols-misc",
@@ -2104,52 +2149,6 @@ dependencies = [
"once_cell",
]
[[package]]
name = "trust-dns-proto"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3119112651c157f4488931a01e586aa459736e9d6046d3bd9105ffb69352d374"
dependencies = [
"async-trait",
"cfg-if",
"data-encoding",
"enum-as-inner",
"futures-channel",
"futures-io",
"futures-util",
"idna 0.4.0",
"ipnet",
"once_cell",
"rand",
"smallvec",
"thiserror",
"tinyvec",
"tokio",
"tracing",
"url",
]
[[package]]
name = "trust-dns-resolver"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10a3e6c3aff1718b3c73e395d1f35202ba2ffa847c6a62eea0db8fb4cfe30be6"
dependencies = [
"cfg-if",
"futures-util",
"ipconfig",
"lru-cache",
"once_cell",
"parking_lot",
"rand",
"resolv-conf",
"smallvec",
"thiserror",
"tokio",
"tracing",
"trust-dns-proto",
]
[[package]]
name = "typenum"
version = "1.17.0"

View File

@@ -14,7 +14,7 @@ lto = "fat"
[dependencies]
tempfile = "3.8"
trust-dns-resolver = "0.23"
hickory-resolver = "0.24.1"
memmap = "0.7"
toml = "0.8"
serde = { version = "1.0", features = ["derive"] }

View File

@@ -1,7 +1,7 @@
use anyhow::Result;
use std::{error::Error, net::IpAddr};
use trust_dns_resolver::TokioAsyncResolver;
use hickory_resolver::TokioAsyncResolver;
pub struct DnsResolver {
resolver: TokioAsyncResolver,