From cc1d8bb3d50e3a709d58bc618ad859010493197b Mon Sep 17 00:00:00 2001 From: Danish Arora <35004822+danisharora099@users.noreply.github.com> Date: Tue, 24 Jan 2023 23:42:21 +0530 Subject: [PATCH] feat: change DoH DNS provider (#1131) * fix: change DoH DNS provider opendns did not support CORS -- switched it with AhaDNS that does not persist logs * Update packages/dns-discovery/src/dns_over_https.ts Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> * add ahadns to cspell * increase timeout on compliance test possibly the new dns provider we use is taking longer than opendns to resolve is why the test did not pass with 5000ms Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com> --- .cspell.json | 1 + packages/dns-discovery/src/dns_over_https.ts | 6 +++--- packages/tests/tests/dns-peer-discovery.spec.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.cspell.json b/.cspell.json index be5ecbff7..b5b55e17e 100644 --- a/.cspell.json +++ b/.cspell.json @@ -5,6 +5,7 @@ "words": [ "abortable", "Alives", + "ahadns", "asym", "backoff", "backoffs", diff --git a/packages/dns-discovery/src/dns_over_https.ts b/packages/dns-discovery/src/dns_over_https.ts index 642465aee..a7062ff29 100644 --- a/packages/dns-discovery/src/dns_over_https.ts +++ b/packages/dns-discovery/src/dns_over_https.ts @@ -16,10 +16,10 @@ export class DnsOverHttps implements DnsClient { */ static DefaultEndpoints: Endpoint[] = [ toEndpoint({ - name: "cisco-doh", + name: "AhaDNS", protocol: "https:", - host: "doh.opendns.com", - ipv4: "146.112.41.2", + host: "doh.la.ahadns.net", + ipv4: "45.67.219.208", }), toEndpoint({ name: "cloudflare", diff --git a/packages/tests/tests/dns-peer-discovery.spec.ts b/packages/tests/tests/dns-peer-discovery.spec.ts index 5e014a2b2..18f361037 100644 --- a/packages/tests/tests/dns-peer-discovery.spec.ts +++ b/packages/tests/tests/dns-peer-discovery.spec.ts @@ -9,7 +9,7 @@ const enrTree = `enrtree://${publicKey}@${fqdn}`; const maxQuantity = 3; describe("DNS Discovery: Compliance Test", async function () { - this.timeout(5000); + this.timeout(10000); tests({ async setup() { return wakuDnsDiscovery(enrTree, {