-
-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DoH Android 9 Support #236
Comments
I think, the "problem" is the compression. I enabled the compression (DNS wire format), now I get the same result: # Cloudflare DoH
curl -H 'accept: application/dns-message' -v 'https://cloudflare-dns.com/dns-query?dns=AAABAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB' | hexdump
...
0000000 0000 8081 0100 0100 0000 0000 7703 7777
0000010 6507 6178 706d 656c 6303 6d6f 0000 0001
0000020 c001 000c 0001 0001 3301 005e 5d04 d8b8
0000030 0022
0000031
# Google DoH
curl -H 'accept: application/dns-message' -v 'https://dns.google/dns-query?dns=AAABAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB' | hexdump
...
0000000 0000 8081 0100 0100 0000 0000 7703 7777
0000010 6507 6178 706d 656c 6303 6d6f 0000 0001
0000020 c001 000c 0001 0001 5000 00c6 5d04 d8b8
0000030 0022
0000031
# Blocky DoH
curl -H 'accept: application/dns-message' -v 'http://localhost:4000/dns-query?dns=AAABAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB' | hexdump
...
0000000 0000 0081 0100 0100 0000 0000 7703 7777
0000010 6507 6178 706d 656c 6303 6d6f 0000 0001
0000020 c001 000c 0001 0001 3301 002a 5d04 d8b8
0000030 0022
0000031 Compression should be optional, but maybe android implementation expects only compressed format |
Hey, Thank you for the revert, but It seems even in your output they are not same. All three are different hexcode in fact. Check this diff Left : Cloudflare Even google and cloudflare's responses are not same 💀 Left: Cloudflare Also I tried using blocky v0.15 in Android 11 phone, It says can't connect to dns server. |
I tested with example.com and all resolvers returned the same result. If you test with another domain, it is possible that different tesolvers return different result (other TTL, different order etc). Can you compare with plain dns query? |
Not sure what's the issue but Android DoH didn't work. I am reading this rfc later will check android docs on how their client works then I might find something. You can use dns[dot]pratikgajjar[dot]in to test if you have android device. |
Ideal Scenario :
1dot1dot1dot1.cloudflare-dns.com
ordns.google
Issue :
Current API is not compatible with cloudflare one or android 9. I have tested via cmd. There must be some global API spec on how to implement DoH.
Note : Current blocky server works with Nebulo (Android App), If we make it compatible then we won't be needing any 3rd party app to use Blocky.
Cloudflare wireformat Request
Blocky Request
I can contribute via writing code as well, Need guidance from author on current implementation and need to figure out what logic cloudflare has used. Looking at binary It seems this might be minor fix with some formatting changes.
Edit 1
The text was updated successfully, but these errors were encountered: