Commit
+7 -10 +/-3 browse
1 | diff --git a/Cargo.toml b/Cargo.toml |
2 | index 7050854..6bdf063 100644 |
3 | --- a/Cargo.toml |
4 | +++ b/Cargo.toml |
5 | @@ -22,11 +22,11 @@ rsa = {version = "0.7.0"} |
6 | ed25519-dalek = "1.0.1" |
7 | sha1 = {version = "0.10", features = ["oid"]} |
8 | sha2 = {version = "0.10.6", features = ["oid"]} |
9 | - trust-dns-resolver = { version = "0.22.0", features = ["dns-over-rustls"] } |
10 | + trust-dns-resolver = { version = "0.22.0", features = ["dns-over-rustls", "dnssec-ring"] } |
11 | lru-cache = "0.1.2" |
12 | parking_lot = "0.12.0" |
13 | ahash = "0.8.0" |
14 | - quick-xml = "0.26.0" |
15 | + quick-xml = "0.27.1" |
16 | serde = { version = "1.0", features = ["derive"] } |
17 | zip = "0.6.3" |
18 | flate2 = "1.0.25" |
19 | diff --git a/src/common/lru.rs b/src/common/lru.rs |
20 | index 7462211..7bf5d1c 100644 |
21 | --- a/src/common/lru.rs |
22 | +++ b/src/common/lru.rs |
23 | @@ -12,15 +12,15 @@ use std::{borrow::Borrow, hash::Hash, time::Instant}; |
24 | |
25 | use parking_lot::Mutex; |
26 | |
27 | - pub(crate) type LruCache<K, V> = Mutex<lru_cache::LruCache<K, LruItem<V>, ahash::RandomState>>; |
28 | + pub type LruCache<K, V> = Mutex<lru_cache::LruCache<K, LruItem<V>, ahash::RandomState>>; |
29 | |
30 | #[derive(Debug, Clone)] |
31 | - pub(crate) struct LruItem<V> { |
32 | + pub struct LruItem<V> { |
33 | item: V, |
34 | valid_until: Instant, |
35 | } |
36 | |
37 | - pub(crate) trait DnsCache<K, V>: Sized { |
38 | + pub trait DnsCache<K, V>: Sized { |
39 | fn with_capacity(capacity: usize) -> Self; |
40 | fn get<Q: ?Sized>(&self, name: &Q) -> Option<V> |
41 | where |
42 | diff --git a/src/common/resolver.rs b/src/common/resolver.rs |
43 | index bdc6829..57bd983 100644 |
44 | --- a/src/common/resolver.rs |
45 | +++ b/src/common/resolver.rs |
46 | @@ -232,12 +232,9 @@ impl Resolver { |
47 | .insert(key.into_owned(), Arc::new(ips), ipv6_lookup.valid_until())) |
48 | } |
49 | |
50 | - pub async fn ip_lookup( |
51 | - &self, |
52 | - key: impl IntoFqdn<'_>, |
53 | - ) -> crate::Result<impl Iterator<Item = IpAddr>> { |
54 | + pub async fn ip_lookup(&self, key: &str) -> crate::Result<impl Iterator<Item = IpAddr>> { |
55 | self.resolver |
56 | - .lookup_ip(key.into_fqdn().as_ref()) |
57 | + .lookup_ip(key) |
58 | .await |
59 | .map(|lookup| lookup.into_iter()) |
60 | .map_err(Error::from) |