Skip to content

Instantly share code, notes, and snippets.

@FlatMapIO
Last active August 29, 2015 14:04
Show Gist options
  • Save FlatMapIO/95ec90ed56619340faf7 to your computer and use it in GitHub Desktop.
Save FlatMapIO/95ec90ed56619340faf7 to your computer and use it in GitHub Desktop.
解决 dns 污染

执行安装 brew install dnscrypt-proxy brew cask install dnscrypt

会卡在这里

==> Downloading http://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-proxy-1.4.0

设定代理(使用 goagent) set http_proxy http://127.0.0.1:8087(我用的 fish shell), 然后, brew 会自动使用代理

cd

brew install dnscrypt-proxy
sudo cp -fv /usr/local/opt/dnscrypt-proxy/*.plist /Library/LaunchDaemons
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnscrypt-proxy.plist

然後設定系統的 DNS 伺服器為 127.0.0.1

备用 DNS 切误使用路由 IP, 否则会发生随机性的 DNS 污染

不要安装 dnscrypt-osx-client, 它会导致系统重启, 更难以清理和卸载.

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