diff --git a/crates/sip-core/Cargo.toml b/crates/sip-core/Cargo.toml index 2d59b33..aa7b03c 100644 --- a/crates/sip-core/Cargo.toml +++ b/crates/sip-core/Cargo.toml @@ -30,12 +30,12 @@ tokio-util = { version = "0.7", features = ["codec"] } tokio-stream = "0.1" async-trait = "0.1" log = "0.4" -thiserror = "1" +thiserror = "2" parking_lot = "0.12" rand = "0.8" bytesstr = "1" downcast-rs = "1" -trust-dns-resolver = "0.23" +hickory-resolver = "0.24" multimap = "0.10" nom = "7" diff --git a/crates/sip-core/src/endpoint.rs b/crates/sip-core/src/endpoint.rs index e58bccf..78d07cf 100644 --- a/crates/sip-core/src/endpoint.rs +++ b/crates/sip-core/src/endpoint.rs @@ -573,7 +573,7 @@ impl EndpointBuilder { /// Set a `trust-dns-resolver` DNS resolver for the endpoint to use. /// /// Uses the system config by default. - pub fn set_dns_resolver(&mut self, dns_resolver: trust_dns_resolver::TokioAsyncResolver) { + pub fn set_dns_resolver(&mut self, dns_resolver: hickory_resolver::TokioAsyncResolver) { self.transports.set_dns_resolver(dns_resolver) } diff --git a/crates/sip-core/src/transport/mod.rs b/crates/sip-core/src/transport/mod.rs index 02f4fa9..3ddcfe2 100644 --- a/crates/sip-core/src/transport/mod.rs +++ b/crates/sip-core/src/transport/mod.rs @@ -302,7 +302,7 @@ pub(crate) struct Transports { stun: StunEndpoint, - dns_resolver: trust_dns_resolver::TokioAsyncResolver, + dns_resolver: hickory_resolver::TokioAsyncResolver, } impl Transports { @@ -561,7 +561,7 @@ impl Transports { pub(crate) struct TransportsBuilder { unmanaged: Vec, factories: Vec>, - dns_resolver: Option, + dns_resolver: Option, } impl TransportsBuilder { @@ -575,16 +575,13 @@ impl TransportsBuilder { self.factories.push(factory); } - pub(crate) fn set_dns_resolver( - &mut self, - dns_resolver: trust_dns_resolver::TokioAsyncResolver, - ) { + pub(crate) fn set_dns_resolver(&mut self, dns_resolver: hickory_resolver::TokioAsyncResolver) { self.dns_resolver = Some(dns_resolver); } pub(crate) fn build(&mut self) -> Transports { let dns_resolver = self.dns_resolver.take().unwrap_or_else(|| { - trust_dns_resolver::TokioAsyncResolver::tokio_from_system_conf() + hickory_resolver::TokioAsyncResolver::tokio_from_system_conf() .expect("Failed to create default system DNS resolver") }); diff --git a/crates/sip-core/src/transport/resolver.rs b/crates/sip-core/src/transport/resolver.rs index d1f2aff..5463cb6 100644 --- a/crates/sip-core/src/transport/resolver.rs +++ b/crates/sip-core/src/transport/resolver.rs @@ -1,10 +1,10 @@ +use hickory_resolver::error::{ResolveError, ResolveErrorKind}; +use hickory_resolver::proto::rr::rdata::{NAPTR, SRV}; +use hickory_resolver::proto::rr::{RData, RecordType}; +use hickory_resolver::{Name, TokioAsyncResolver}; use multimap::MultiMap; use std::io; use std::net::{IpAddr, SocketAddr}; -use trust_dns_resolver::error::{ResolveError, ResolveErrorKind}; -use trust_dns_resolver::proto::rr::rdata::{NAPTR, SRV}; -use trust_dns_resolver::proto::rr::{RData, RecordType}; -use trust_dns_resolver::{Name, TokioAsyncResolver}; #[derive(Debug, Clone, Copy)] pub(super) struct ServerEntry {