Mac 配置cloudflare dns

 

mac 用cloudflare的doh dns

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
  - https://208.67.222.222/dns-query
  - https://208.67.220.220/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)

 

需要注意,你的网络可能封锁了访问1.1.1.1,所以你只能想办法换一家其他的dns

分类: 默认 标签: 发布于: 2021-12-07 09:32:55, 更新于: 2021-12-07 09:55:08