AdguardTeam / AdguardForAndroid

Open bug tracker for Android version of AdGuard.
https://adguard.com/
1.31k stars 89 forks source link

Blahdns not working in adguard for mobile #3023

Closed Techguyprivate closed 5 years ago

Techguyprivate commented 5 years ago

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

Issue Details

Expected Behavior

Blahdns should work . Putting address given in blahdns.com should work.

Go to setting, then dsn section in adguard . Put either doh or dot or dnscrypt address for blahdns in dns setting. . E.g " https:// doh-jp-blahdns.com/dns-query" ( without the quote of course. ) .

Click save &select.

It should save it.

Actual Behavior

Saying no connection.

Putting the address of blahdns showing no connection in red letter.

Screenshots

Screenshot_2019-08-24-22-14-37-09_a93965f46c4a4b0ed1be737bdf2bc8fc

Screenshot:

Additional Information

ameshkov commented 5 years ago

Their DOT server does not seem to be operational:

$ ./dnslookup example.org tls://doh-jp.blahdns.com
dnslookup undefined
2019/08/28 12:32:29 Cannot make the DNS request: Failed to read a request from doh-jp.blahdns.com:853, cause: unexpected EOF

Their DOH server works okay:

./dnslookup example.org  https://doh-jp.blahdns.com/dns-query
dnslookup undefined
dnslookup result:
;; opcode: QUERY, status: NOERROR, id: 32507
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; QUESTION SECTION:
;example.org.   IN   A

;; ANSWER SECTION:
example.org.    86313   IN  A   93.184.216.34

;; ADDITIONAL SECTION:

;; OPT PSEUDOSECTION:
; EDNS: version 0; flags: ; udp: 4096

Tested with https://github.com/ameshkov/dnslookup

ameshkov commented 5 years ago

Ah, my bad, DOT is also okay:

./dnslookup example.org tls://dot-jp.blahdns.com
dnslookup undefined
dnslookup result:
;; opcode: QUERY, status: NOERROR, id: 4412
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;example.org.   IN   A

;; ANSWER SECTION:
example.org.    86267   IN  A   93.184.216.34

And I've been able to reproduce this issue indeed.

Techguyprivate commented 5 years ago

Blahdns works with other apps or softwares. For example, blah dns works with

  1. Nebulo, an open source app for dns encryption

  2. Intra from Google.

  3. Stubby dns

  4. Technitium dns

  5. Adguardhome in pc

But doesn't work for some reason with adguard for mobile . Tried most of the thing like clearing cache, uninstalling & imstalling again,reboot, using different ports etc.

Is it to do anything with strict esni ? Blah dns supports strict esni i.e. encrypted server name indiactor.

ameshkov commented 5 years ago

Yeah, that's why I marked it as a bug:)

This is actually very strange because AdGuard Home uses the very same DNS library as AdGuard for Android.

admitrevskiy commented 5 years ago

I've found the out root cause of this issue. We use ipv4only.arpa. as DNS question name for test message. 2/3 of blah dns servers do not have records for this name and it's weird :)

AGHome uses google-public-dns-a.google.com. as a question name during upstreams test. @ameshkov should we use the same question name for mobile lib?

ameshkov commented 5 years ago

Can they maybe fix this instead? It's really strange to not resolve it

ameshkov commented 5 years ago

@admitrevskiy plz report it there: https://github.com/ookangzheng/blahdns

admitrevskiy commented 5 years ago

Here is the report for Blah DNS: https://github.com/ookangzheng/blahdns/issues/60