Fan Zhen Coder & Teacher

使用 Stubby 访问 1.1.1.1 DNS 服务器

2018-04-03

Cloudflare 新发布高速dns服务器 1.1.1.1,于是在Mac上配置 stubby 通过 TLS 加密使用。

安装 stubby

	brew install stubby

修改配置

配置文件 /usr/local/etc/stubby/stubby.yml

	upstream_recursive_servers:
	# IPv4 addresses
	# The 1.1.1.1 Cloudflare Servers
	  - address_data: 1.1.1.1
	    tls_auth_name: "cloudflare-dns.com"
	    tls_pubkey_pinset:
	      - digest: "sha256"
	        value: yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc=
	  - address_data: 1.0.0.1
	    tls_auth_name: "cloudflare-dns.com"
	    tls_pubkey_pinset:
	      - digest: "sha256"
	        value: yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc=
	 
	# IPv6 addresses
	# The 1.1.1.1 Cloudflare Servers
	  - address_data: 2606:4700:4700::1111
	    tls_auth_name: "cloudflare-dns.com"
	    tls_pubkey_pinset:
	      - digest: "sha256"
	        value: yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc=
	  - address_data: 2606:4700:4700::1001
	    tls_auth_name: "cloudflare-dns.com"
	    tls_pubkey_pinset:
	      - digest: "sha256"
	        value: yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc=

Stubby GUI for MacOS

这里下载,安装,修改配置,运行,Test

使用其它端口

	listen_addresses:
  - address_data: 127.0.0.1
 	    port: 5353
  - address_data: 0::1
  		 port: 5353

参考

  1. Privacy: Using DNS-over-TLS with the Quad9 DNS Service

  2. stubby.yml


Similar Posts

Comments