Quad9 dns instead of system dns

quad9-dns
Daniel Karzel 3 years ago
parent 56a23fa98f
commit 08c5d1c12e
No known key found for this signature in database
GPG Key ID: 30C3FC2E438ADB6E

1
Cargo.lock generated

@ -3699,6 +3699,7 @@ dependencies = [
"tracing-appender",
"tracing-futures",
"tracing-subscriber",
"trust-dns-resolver",
"url 2.2.1",
"uuid",
"void",

@ -56,6 +56,7 @@ tracing = { version = "0.1", features = ["attributes"] }
tracing-appender = "0.1"
tracing-futures = { version = "0.2", features = ["std-future", "futures-03"] }
tracing-subscriber = { version = "0.2", default-features = false, features = ["fmt", "ansi", "env-filter", "chrono", "tracing-log"] }
trust-dns-resolver = "0.20"
url = { version = "2", features = ["serde"] }
uuid = { version = "0.8", features = ["serde", "v4"] }
void = "1"

@ -23,7 +23,9 @@ pub fn build(id_keys: &identity::Keypair) -> Result<SwapTransport> {
let noise = NoiseConfig::xx(dh_keys).into_authenticated();
let tcp = TokioTcpConfig::new().nodelay(true);
let dns = TokioDnsConfig::system(tcp)?;
let config = trust_dns_resolver::config::ResolverConfig::quad9();
let opts = trust_dns_resolver::config::ResolverOpts::default();
let dns = TokioDnsConfig::custom(tcp, config, opts)?;
let websocket = WsConfig::new(dns.clone());
let transport = websocket

Loading…
Cancel
Save