本帖最后由 QQ66 于 2018-11-5 09:46 编辑
https_dns_proxy
github
安装- opkg update
- opkg install https_dns_proxy
复制代码
Snapshot版支持了luci配置(18.06.1和之前的版本还没有),可以在openwrt后台搜索安装luci-app-https_dns_proxy并在luci界面配置。 修改配置文件- vi /etc/config/https_dns_proxy
复制代码 把url_prefix改为cloudflare,默认的Google dns 对中国大陆不友好。
配置如下
- config https_dns_proxy
- option listen_addr '0.0.0.0'
- option listen_port '5353'
- option user 'nobody'
- option group 'nogroup'
- option subnet_addr ''
- option proxy_server ''
- option url_prefix 'https://cloudflare-dns.com/dns-query?ct=application/dns-json&'
复制代码
重启软件- /etc/init.d/https_dns_proxy restart
复制代码
查看进程修改生效
- root@OpenWrt:~# ps | grep https_dns_proxy
- 8697 root 15928 S /usr/sbin/https_dns_proxy -a 0.0.0.0 -p 5353 -u nobody -g nogroup -r https://cloudflare-dns.com/dns-query?ct=application/dns-json&
复制代码
测试成功,查询时间大概40ms - root@OpenWrt:~# dig @192.168.1.1 -p 5353 bing.com
- ; <<>> DiG 9.11.2-P1 <<>> @192.168.1.1 -p 5353 bing.com
- ; (1 server found)
- ;; global options: +cmd
- ;; Got answer:
- ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44320
- ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
- ;; QUESTION SECTION:
- ;bing.com. IN A
- ;; ANSWER SECTION:
- bing.com. 2091 IN A 204.79.197.200
- bing.com. 2091 IN A 13.107.21.200
- ;; Query time: 39 msec
- ;; SERVER: 192.168.1.1#5353(192.168.1.1)
- ;; WHEN: Sat Jul 07 06:26:15 GMT 2018
- ;; MSG SIZE rcvd: 58
复制代码
视频链接:
YouTube短链接
|