Skip to content
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

dns.google is not compatible with "cloudflared" #113

Open
bigdargon opened this issue Jun 28, 2019 · 7 comments

Comments

@bigdargon
Copy link

commented Jun 28, 2019

Hi,
I am using debian and ubuntu operating systems, and I run cloudflared to use dns-over-https.

Previously I used https://dns.google.com/experimental address, everything works normally. But I switched to using a new address according to google's notification, I received an error message:

What do I have to do to fix this problem? Thank you!

@bigdargon

This comment has been minimized.

Copy link
Author

commented Jul 2, 2019

I created the issue here https://issuetracker.google.com/issues/136198937 and got the answer:

https://dns.google/dns-query is the right endpoint to use.

The problem is that (your version of) cloudflared is apparently still using the MIME type application/dns-udpwireformat rather than application/dns-message for the Content-Type header

From what I can tell, cloudflared is using the CoreDNS modular DNS server to implement its DNS to DoH proxy. The current version of CoreDNS DoH support (https://github.com/coredns/coredns/blob/master/plugin/pkg/doh/doh.go) uses application/dns-message, but the DoH support in CoreDNS was reconfigured and it is possible that cloudflared might need changes to work with the current CoreDNS architecture.

If you have been using the same version of cloudflared for a year or more, you should download a new copy and see if it still has this problem.

If the latest cloudflared still gives a 415 error, you might want to open an issue or request support on the Cloudflare community forum. If you are familiar with compiling Go programs, you could try to build cloudflared yourself and see what version of CoreDNS or the doh plugin it is using.

In the meantime, you can continue to use the https://dns.google.com/experimental endpoint, at least for another few weeks until you get the software issues sorted.

Can Cloudflared update for compatibility?

@rezaxdi

This comment has been minimized.

Copy link

commented Jul 2, 2019

Ok, due to today's cloudlfare outage suddenly I was not able to visit any site because dns was down. I tried to use google dns in cloudflared client and it was not working. So I had to uninstall cloudflared and get back to dnscrypt. I think cloudflared needs to update it's client to be compatible with other DoH servers.

@sssilver

This comment has been minimized.

Copy link
Collaborator

commented Jul 10, 2019

We've merged #108, and will release it soon -- does this help resolve the problem?

@ndrwy

This comment has been minimized.

Copy link

commented Jul 12, 2019

Thanks @sssilver for looking into this, I've done some testing and below are my results:

# cloudflared --version
cloudflared version 2019.7.0 (built 2019-07-11-1656 UTC)
cloudflared[27174]: time="2019-07-11T22:48:42-04:00" level=error msg="failed to connect to an HTTPS backend \"https://dns.google/dns-query\"" error="failed to perform an HTTPS request: Post https://dns.google/dns-query: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
cloudflared[27316]: time="2019-07-11T22:50:11-04:00" level=error msg="failed to connect to an HTTPS backend \"https://dns.google/resolve\"" error="failed to perform an HTTPS request: Post https://dns.google/resolve: dial tcp: lookup dns.google on 127.0.0.1:53: read udp 127.0.0.1:53349->127.0.0.1:53: i/o timeout"
cloudflared[27256]: time="2019-07-11T22:49:01-04:00" level=error msg="failed to connect to an HTTPS backend \"https://8.8.8.8/dns-query\"" error="returned status code 404"
@bigdargon

This comment has been minimized.

Copy link
Author

commented Jul 14, 2019

Thanks @sssilver but still not working!

@sssilver

This comment has been minimized.

Copy link
Collaborator

commented Jul 15, 2019

2019.7.0 is right. Can you confirm that the Content-Type is set to what's expected? If so, then the issue must be something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.