Skip to content

Instantly share code, notes, and snippets.

@vdchuyen
Created August 9, 2023 07:45
Show Gist options
  • Save vdchuyen/a6dc2a1ee1c350aa00bf5461a0db8d00 to your computer and use it in GitHub Desktop.
Save vdchuyen/a6dc2a1ee1c350aa00bf5461a0db8d00 to your computer and use it in GitHub Desktop.
Check Cloud DNS
#!/opt/homebrew/bin/fish
echo "Google DNS"
curl -s 'https://dns.google/resolve?name='$argv[1]'&type='$argv[2] | jq '.Answer'
echo -e "\nCloudflare DNS"
curl -s --http2 -H "accept: application/dns-json" 'https://1.1.1.1/dns-query?name='$argv[1]'&type='$argv[2] | jq '.Answer'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment