tokio-xmpp: Bump hickory-resolver to 0.25
This commit is contained in:
parent
c11075d1d4
commit
e70dd957f4
3 changed files with 11 additions and 10 deletions
|
|
@ -29,7 +29,7 @@ xmpp-parsers = { version = "0.21", path = "../parsers", features = [ "log" ] }
|
|||
xso = { version = "0.1", path = "../xso" }
|
||||
|
||||
# these are only needed for starttls ServerConnector support
|
||||
hickory-resolver = { version = "0.24", optional = true}
|
||||
hickory-resolver = { version = "0.25", optional = true}
|
||||
idna = { version = "1.0", optional = true}
|
||||
native-tls = { version = "0.2", optional = true }
|
||||
tokio-native-tls = { version = "0.3", optional = true }
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@ use core::{fmt, net::SocketAddr};
|
|||
#[cfg(feature = "dns")]
|
||||
use futures::{future::select_ok, FutureExt};
|
||||
#[cfg(feature = "dns")]
|
||||
use hickory_resolver::{
|
||||
config::LookupIpStrategy, name_server::TokioConnectionProvider, IntoName, TokioAsyncResolver,
|
||||
};
|
||||
use hickory_resolver::{config::LookupIpStrategy, IntoName, TokioResolver};
|
||||
#[cfg(feature = "dns")]
|
||||
use log::debug;
|
||||
use tokio::net::TcpStream;
|
||||
|
|
@ -130,7 +128,10 @@ impl DnsConfig {
|
|||
return Ok(TcpStream::connect(&SocketAddr::new(ip, fallback_port)).await?);
|
||||
}
|
||||
|
||||
let resolver = TokioAsyncResolver::tokio_from_system_conf()?;
|
||||
let (_config, options) = hickory_resolver::system_conf::read_system_conf()?;
|
||||
let resolver = TokioResolver::builder_tokio()?
|
||||
.with_options(options)
|
||||
.build();
|
||||
|
||||
let srv_domain = format!("{}.{}.", srv, ascii_domain).into_name()?;
|
||||
let srv_records = resolver.srv_lookup(srv_domain.clone()).await.ok();
|
||||
|
|
@ -164,9 +165,11 @@ impl DnsConfig {
|
|||
return Ok(TcpStream::connect(&SocketAddr::new(ip, port)).await?);
|
||||
}
|
||||
|
||||
let (config, mut options) = hickory_resolver::system_conf::read_system_conf()?;
|
||||
let (_config, mut options) = hickory_resolver::system_conf::read_system_conf()?;
|
||||
options.ip_strategy = LookupIpStrategy::Ipv4AndIpv6;
|
||||
let resolver = TokioAsyncResolver::new(config, options, TokioConnectionProvider::default());
|
||||
let resolver = TokioResolver::builder_tokio()?
|
||||
.with_options(options)
|
||||
.build();
|
||||
|
||||
let ips = resolver.lookup_ip(ascii_domain).await?;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
use core::{error::Error as StdError, fmt, net::AddrParseError, str::Utf8Error};
|
||||
#[cfg(feature = "dns")]
|
||||
use hickory_resolver::{
|
||||
error::ResolveError as DnsResolveError, proto::error::ProtoError as DnsProtoError,
|
||||
};
|
||||
use hickory_resolver::{proto::ProtoError as DnsProtoError, ResolveError as DnsResolveError};
|
||||
use sasl::client::MechanismError as SaslMechanismError;
|
||||
use std::io;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue