diff --git a/Cargo.lock b/Cargo.lock
index 98d0a971eff..c7118a5f776 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -402,17 +402,17 @@ dependencies = [
[[package]]
name = "async-std-resolver"
-version = "0.23.0"
+version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0354a68a52265a3bde76005ddd2726624ef8624614f7f58871301de205a58a59"
+checksum = "3c0ed2b6671c13d2c28756c5a64e04759c1e0b5d3d7ac031f521c3561e21fbcb"
dependencies = [
"async-std",
"async-trait",
"futures-io",
"futures-util",
+ "hickory-resolver",
"pin-utils",
"socket2 0.5.5",
- "trust-dns-resolver",
]
[[package]]
@@ -1900,6 +1900,52 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f"
+[[package]]
+name = "hickory-proto"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "091a6fbccf4860009355e3efc52ff4acf37a63489aad7435372d44ceeb6fbbcf"
+dependencies = [
+ "async-trait",
+ "cfg-if",
+ "data-encoding",
+ "enum-as-inner",
+ "futures-channel",
+ "futures-io",
+ "futures-util",
+ "idna",
+ "ipnet",
+ "once_cell",
+ "rand 0.8.5",
+ "socket2 0.5.5",
+ "thiserror",
+ "tinyvec",
+ "tokio",
+ "tracing",
+ "url",
+]
+
+[[package]]
+name = "hickory-resolver"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35b8f021164e6a984c9030023544c57789c51760065cd510572fedcfb04164e8"
+dependencies = [
+ "cfg-if",
+ "futures-util",
+ "hickory-proto",
+ "ipconfig",
+ "lru-cache",
+ "once_cell",
+ "parking_lot",
+ "rand 0.8.5",
+ "resolv-conf",
+ "smallvec",
+ "thiserror",
+ "tokio",
+ "tracing",
+]
+
[[package]]
name = "hkdf"
version = "0.12.3"
@@ -2048,7 +2094,7 @@ dependencies = [
"rustls 0.20.8",
"rustls-native-certs",
"tokio",
- "tokio-rustls 0.23.4",
+ "tokio-rustls",
]
[[package]]
@@ -2555,6 +2601,7 @@ dependencies = [
"async-std-resolver",
"async-trait",
"futures",
+ "hickory-resolver",
"libp2p-core",
"libp2p-identity",
"parking_lot",
@@ -2562,7 +2609,6 @@ dependencies = [
"tokio",
"tracing",
"tracing-subscriber",
- "trust-dns-resolver",
]
[[package]]
@@ -2719,6 +2765,7 @@ dependencies = [
"async-std",
"data-encoding",
"futures",
+ "hickory-proto",
"if-watch",
"libp2p-core",
"libp2p-identity",
@@ -2733,7 +2780,6 @@ dependencies = [
"tokio",
"tracing",
"tracing-subscriber",
- "trust-dns-proto",
"void",
]
@@ -5728,16 +5774,6 @@ dependencies = [
"webpki",
]
-[[package]]
-name = "tokio-rustls"
-version = "0.24.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
-dependencies = [
- "rustls 0.21.8",
- "tokio",
-]
-
[[package]]
name = "tokio-stream"
version = "0.1.14"
@@ -5927,64 +5963,6 @@ dependencies = [
"tracing-log",
]
-[[package]]
-name = "trust-dns-proto"
-version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0dc775440033cb114085f6f2437682b194fa7546466024b1037e82a48a052a69"
-dependencies = [
- "async-trait",
- "bytes",
- "cfg-if",
- "data-encoding",
- "enum-as-inner",
- "futures-channel",
- "futures-io",
- "futures-util",
- "h2",
- "http",
- "idna",
- "ipnet",
- "once_cell",
- "rand 0.8.5",
- "rustls 0.21.8",
- "rustls-pemfile",
- "rustls-webpki",
- "smallvec",
- "socket2 0.5.5",
- "thiserror",
- "tinyvec",
- "tokio",
- "tokio-rustls 0.24.1",
- "tracing",
- "url",
- "webpki-roots",
-]
-
-[[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 0.8.5",
- "resolv-conf",
- "rustls 0.21.8",
- "smallvec",
- "thiserror",
- "tokio",
- "tokio-rustls 0.24.1",
- "tracing",
- "trust-dns-proto",
- "webpki-roots",
-]
-
[[package]]
name = "try-lock"
version = "0.2.4"
diff --git a/protocols/mdns/Cargo.toml b/protocols/mdns/Cargo.toml
index ef67a7e51b1..90ee633a9c4 100644
--- a/protocols/mdns/Cargo.toml
+++ b/protocols/mdns/Cargo.toml
@@ -24,7 +24,7 @@ smallvec = "1.11.1"
socket2 = { version = "0.5.5", features = ["all"] }
tokio = { version = "1.33", default-features = false, features = ["net", "time"], optional = true}
tracing = "0.1.37"
-trust-dns-proto = { version = "0.23.0", default-features = false, features = ["mdns"] }
+hickory-proto = { version = "0.24.0", default-features = false, features = ["mdns"] }
void = "1.0.2"
[features]
diff --git a/protocols/mdns/src/behaviour/iface/dns.rs b/protocols/mdns/src/behaviour/iface/dns.rs
index 61fd5d329b9..6cc5550dbe5 100644
--- a/protocols/mdns/src/behaviour/iface/dns.rs
+++ b/protocols/mdns/src/behaviour/iface/dns.rs
@@ -395,9 +395,9 @@ impl error::Error for MdnsResponseError {}
#[cfg(test)]
mod tests {
use super::*;
+ use hickory_proto::op::Message;
use libp2p_identity as identity;
use std::time::Duration;
- use trust_dns_proto::op::Message;
#[test]
fn build_query_correct() {
diff --git a/protocols/mdns/src/behaviour/iface/query.rs b/protocols/mdns/src/behaviour/iface/query.rs
index 0185028f6ff..421ea10284c 100644
--- a/protocols/mdns/src/behaviour/iface/query.rs
+++ b/protocols/mdns/src/behaviour/iface/query.rs
@@ -20,6 +20,10 @@
use super::dns;
use crate::{META_QUERY_SERVICE_FQDN, SERVICE_NAME_FQDN};
+use hickory_proto::{
+ op::Message,
+ rr::{Name, RData},
+};
use libp2p_core::{
address_translation,
multiaddr::{Multiaddr, Protocol},
@@ -27,10 +31,6 @@ use libp2p_core::{
use libp2p_identity::PeerId;
use std::time::Instant;
use std::{fmt, net::SocketAddr, str, time::Duration};
-use trust_dns_proto::{
- op::Message,
- rr::{Name, RData},
-};
/// A valid mDNS packet received by the service.
#[derive(Debug)]
@@ -47,7 +47,7 @@ impl MdnsPacket {
pub(crate) fn new_from_bytes(
buf: &[u8],
from: SocketAddr,
- ) -> Result