Skip to content

Instantly share code, notes, and snippets.

@formigarafa
Last active March 15, 2017 08:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save formigarafa/dfbecca5d6de6993a51f2cbf51422b72 to your computer and use it in GitHub Desktop.
Save formigarafa/dfbecca5d6de6993a51f2cbf51422b72 to your computer and use it in GitHub Desktop.
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