Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Basic to get google dns over https working.

Google has currently available a DNS over HTTPS service in beta. source: https://developers.google.com/speed/public-dns/docs/dns-over-https

I couldn't find any api endpoint to make calls. But looking arround, I found a repository at github with some code to use such api. source: https://github.com/learnaddict/dnsoverhttps/blob/7bec8802fe8e85d31f75e74d46f57e7880e09e9f/dnsoverhttps.go#L12

With this I could make a request and get some result:

https://dns.google.com/resolve?name=www.elisafontenelle.com.br

The result.json file in this gist have the result from the call above.

{
"Status": 0,
"TC": false,
"RD": true,
"RA": true,
"AD": false,
"CD": false,
"Question": [
{
"name": "www.elisafontenelle.com.br.",
"type": 1
}
],
"Answer": [
{
"name": "www.elisafontenelle.com.br.",
"type": 1,
"TTL": 299,
"data": "104.24.102.88"
},
{
"name": "www.elisafontenelle.com.br.",
"type": 1,
"TTL": 299,
"data": "104.24.103.88"
}
],
"Comment": "Response from 173.245.59.68"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.