Created
September 15, 2020 09:26
-
-
Save com30n/bd6da2d38f463eaeaa5b65e4baa71047 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Thanks to https://gist.github.com/soderlind/6a440cd3c8e017444097cf2c89cc301d | |
# Update your homebrew installation | |
brew up | |
# Install cloudflared using homebrew: | |
brew install cloudflare/cloudflare/cloudflared | |
mkdir -pv $(brew --prefix)/etc/cloudflared/ | |
# Create /usr/local/etc/cloudflared/config.yaml, with the following content | |
cat << EOF > $(brew --prefix)/etc/cloudflared/config.yaml | |
proxy-dns: true | |
proxy-dns-upstream: | |
- https://1.1.1.1/dns-query | |
- https://1.0.0.1/dns-query | |
port: 5053 | |
EOF | |
#Activate cloudflared as a service | |
sudo cloudflared service install | |
#Test | |
dig +short @127.0.0.1 github.com AA | |
#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