将 OpenWrt 默认的域名解析由 dnsmasq 换为 dns2socks

117 天前
 losoft

1.禁止 dnsmasq 再使用 53 端口,方法是: 网络->DHCP/DNS->高级设置”中将 DNS 监听端口设置为 0

2.手工运行 dns2socks 服务: ./dns2socks -l 0.0.0.0:53 -d 1.1.1.1:53 -s socks5://username:password@xxx.xxx.xxx.xxx:1080 程序下载地址: https://github.com/tun2proxy/dns2socks 其中 xxx.xxx.xxx.xxx:1080 是事先已经搭建好的 vps 上面的 socks5 服务。

3.openwrt---网络---诊断 nslookup 正确解析出域名 google.com 的 ip 地址

Server: 127.0.0.1 Address: 127.0.0.1#53

Non-authoritative answer: Name: google.com Address: 142.250.176.14 Name: google.com Address: 2607:f8b0:4007:818::200e

1563 次点击
所在节点    OpenWrt
3 条回复
crysislinux
117 天前
其实没必要完全禁用 dnsmasq ,写个配置把 dnsmasq 的请求全部转发给别的 dns 服务就好了
wuruxu
116 天前
dnsmasq 好用的很
1. 把 1.1./16 和 8.8./16 全部,通过 nfset, 启动后自动 使用 wireguard VPN 通道
2. 在 dnsmasq 配置哪些域名流量通过 1.1. 去解析并加入 nfset , 这样你就在整个 WIFI 上开启了透明代理
chuxi
77 天前
真辛苦,dnsmasq 的 DHCP 以及其他的高级功能非常有用
参考
https://github.com/9566618/shadowproxy/wiki

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1132585

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX