Skip to content

Instantly share code, notes, and snippets.

@AlphaWong
Forked from soderlind/Install.txt
Created February 26, 2021 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlphaWong/0c54a2de9c66cad2fcca2b97a98ea4ab to your computer and use it in GitHub Desktop.
Save AlphaWong/0c54a2de9c66cad2fcca2b97a98ea4ab to your computer and use it in GitHub Desktop.
macOS DoH! (DNS over HTTPS) using cloudflared
1) Install cloudflared using homebrew:
brew install cloudflare/cloudflare/cloudflared
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content
proxy-dns: true
proxy-dns-upstream:
- https://1.1.1.1/dns-query
- https://1.0.0.1/dns-query
3) Activate cloudflared as a service
sudo cloudflared service install
4) Test
dig +short @127.0.0.1 github.com AA
5) If OK, change DNS on your mac to 127.0.0.1 (System Preferences->Network->Advanced->DNS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment