diff --git a/Cargo.lock b/Cargo.lock index 7b22ff2e9..467819116 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1400,14 +1400,14 @@ checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" [[package]] name = "enum-as-inner" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" +checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" dependencies = [ "heck 0.4.1", "proc-macro2 1.0.66", "quote 1.0.33", - "syn 1.0.109", + "syn 2.0.29", ] [[package]] @@ -2052,17 +2052,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.4.0" @@ -2812,12 +2801,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.7.2" @@ -5505,9 +5488,9 @@ dependencies = [ [[package]] name = "trust-dns-proto" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" +checksum = "0dc775440033cb114085f6f2437682b194fa7546466024b1037e82a48a052a69" dependencies = [ "async-trait", "cfg-if", @@ -5516,9 +5499,9 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "idna 0.2.3", + "idna", "ipnet", - "lazy_static", + "once_cell", "rand", "serde", "smallvec 1.11.0", @@ -5531,16 +5514,17 @@ dependencies = [ [[package]] name = "trust-dns-resolver" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" +checksum = "2dff7aed33ef3e8bf2c9966fccdfed93f93d46f432282ea875cd66faabc6ef2f" dependencies = [ "cfg-if", "futures-util", "ipconfig", - "lazy_static", "lru-cache", + "once_cell", "parking_lot", + "rand", "resolv-conf", "serde", "smallvec 1.11.0", @@ -5686,7 +5670,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna", "percent-encoding", "serde", ] diff --git a/Cargo.toml b/Cargo.toml index 1afd0d754..2205205fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,4 +33,6 @@ mlua = "0.8" rustls = "0.21" tokio = "1.32" tokio-rustls = "0.24" -trust-dns-resolver = "0.22" # can't upgrade to 0.23 due to mail-auth using 0.22 +# Be sure to update the link to the docs in docs/reference/kumo.dns/configure_resolver.md +# to match the version that we are using when you update this dep +trust-dns-resolver = "0.23" diff --git a/crates/dns-resolver/src/lib.rs b/crates/dns-resolver/src/lib.rs index 6b85f2c9a..3ec1bce3c 100644 --- a/crates/dns-resolver/src/lib.rs +++ b/crates/dns-resolver/src/lib.rs @@ -355,7 +355,7 @@ pub async fn ipv4_lookup(key: &str) -> ResolveResult<(Arc>, Instant) let ips = ipv4_lookup .as_lookup() .record_iter() - .filter_map(|r| (IpAddr::from(*r.data()?.as_a()?).into())) + .filter_map(|r| Some(r.data()?.as_a()?.0.into())) .collect::>(); let ips = Arc::new(ips); @@ -377,7 +377,7 @@ pub async fn ipv6_lookup(key: &str) -> ResolveResult<(Arc>, Instant) let ips = ipv6_lookup .as_lookup() .record_iter() - .filter_map(|r| (IpAddr::from(*r.data()?.as_aaaa()?)).into()) + .filter_map(|r| Some(r.data()?.as_aaaa()?.0.into())) .collect::>(); let ips = Arc::new(ips); diff --git a/crates/mod-dns-resolver/src/lib.rs b/crates/mod-dns-resolver/src/lib.rs index 55cda04b6..ea9affd35 100644 --- a/crates/mod-dns-resolver/src/lib.rs +++ b/crates/mod-dns-resolver/src/lib.rs @@ -96,7 +96,7 @@ pub fn register(lua: &Lua) -> anyhow::Result<()> { .map_err(any_err)?; let mut c = NameServerConfig::new(ip, protocol); - c.trust_nx_responses = trust_negative_responses; + c.trust_negative_responses = trust_negative_responses; if let Some(bind) = bind_addr { let addr: SocketAddr = bind @@ -113,7 +113,7 @@ pub fn register(lua: &Lua) -> anyhow::Result<()> { }); } - let resolver = TokioAsyncResolver::tokio(r_config, config.options).map_err(any_err)?; + let resolver = TokioAsyncResolver::tokio(r_config, config.options); dns_resolver::reconfigure_resolver(resolver).await; diff --git a/docs/reference/kumo.dns/configure_resolver.md b/docs/reference/kumo.dns/configure_resolver.md index 3a7cc5dd0..a5b489978 100644 --- a/docs/reference/kumo.dns/configure_resolver.md +++ b/docs/reference/kumo.dns/configure_resolver.md @@ -28,7 +28,7 @@ your system configuration. * `options` - a lua table listing out additional resolver options. The possible names, values and meanings are documented in the [trust DNS resolver ResolverOpts - documentation](https://docs.rs/trust-dns-resolver/0.22.0/trust_dns_resolver/config/struct.ResolverOpts.html) + documentation](https://docs.rs/trust-dns-resolver/0.23.0/trust_dns_resolver/config/struct.ResolverOpts.html) ```lua kumo.on('init', function()