Skip to content

Commit

Permalink
update to trust-dns 0.20.0-alpha.3
Browse files Browse the repository at this point in the history
  • Loading branch information
junnlikestea committed Oct 29, 2020
1 parent 35dd4f5 commit c8f023d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ opt-level = 3
debug = false

[dependencies]
trust-dns-resolver = "0.20.0-alpha.2"
trust-dns-proto = "0.20.0-alpha.2"
trust-dns-resolver = "0.20.0-alpha.3"
trust-dns-proto = "0.20.0-alpha.3"
tokio = { version = "0.2.22", features = ["fs","sync", "rt-threaded", "macros"]}
serde = { version = "1.0.115", features = ["derive", "rc"] }
serde_json = "1.0.57"
Expand Down
5 changes: 2 additions & 3 deletions src/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ impl Default for Resolver {
negative_min_ttl: None,
positive_max_ttl: None,
negative_max_ttl: None,
distrust_nx_responses: true,
num_concurrent_reqs: 2,
preserve_intermediates: true,
},
Expand Down Expand Up @@ -107,7 +106,7 @@ impl Resolver {
pub fn load_resolvers(mut self, path: &str) -> Self {
let file = std::fs::read_to_string(path).unwrap();
let ips: Vec<IpAddr> = file.lines().map(|l| l.parse::<IpAddr>().unwrap()).collect();
let group = NameServerConfigGroup::from_ips_clear(&ips, 53);
let group = NameServerConfigGroup::from_ips_clear(&ips, 53, false);
self.config = ResolverConfig::from_parts(None, vec![], group);
self.nameservers = ips;
self
Expand Down Expand Up @@ -216,7 +215,7 @@ impl Resolver {
// bounds adding `.` performs a faster query.
let target_cpy = target.clone() + ".";
let mut tx1 = tx.clone();
let group = NameServerConfigGroup::from_ips_clear(&[ns], 53);
let group = NameServerConfigGroup::from_ips_clear(&[ns], 53, false);
let resolver = Arc::new(
TokioAsyncResolver::tokio(
ResolverConfig::from_parts(None, vec![], group),
Expand Down

0 comments on commit c8f023d

Please sign in to comment.