Skip to content

Instantly share code, notes, and snippets.

@ipmb
Created May 31, 2018 20:28
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ipmb/b3ae9c5a787eda0f9873cce3bc0b3449 to your computer and use it in GitHub Desktop.
Save ipmb/b3ae9c5a787eda0f9873cce3bc0b3449 to your computer and use it in GitHub Desktop.
DNS over HTTP (DOH) on MacOS

Install

brew install dnscrypt-proxy

Configure

Edit /usr/local/etc/dnscrypt-proxy.toml as needed. I added/modified the following lines:

server_names = ['google', 'cloudflare']
ipv6_servers = true

Verify

/usr/local/opt/dnscrypt-proxy/sbin/dnscrypt-proxy -config /usr/local/etc/dnscrypt-proxy.toml -resolve google.com

Start

sudo brew services start dnscrypt-proxy

(sudo is needed so the service can bind to port 53)

Set Default Resolver

networksetup -setdnsservers Wi-Fi 127.0.0.1

...or use the Network Preference Pane (Advanced > DNS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment