有办法通过 DNS 分流实现国内网站直连、国外网站走 clash 的 fake-ip 吗?

2022-10-09 11:29:32 +08:00
 systemcall

试了一下 smartdns ,好像不行,每次返回的都不是 fake-ip

4384 次点击
所在节点    宽带症候群
9 条回复
yuange1975
2022-10-09 12:19:13 +08:00
adguard home
ltkun
2022-10-09 12:33:32 +08:00
mosdns
ericww
2022-10-09 14:38:54 +08:00
xubair
2022-10-09 18:13:46 +08:00
mosdns
terrancesiu
2022-10-09 18:51:41 +08:00
pffrank
2022-10-10 10:17:31 +08:00
smartdns+adguard home
tvirus
2022-10-11 22:48:09 +08:00
mosdns-cn
neroxps
2022-10-12 11:33:00 +08:00
https://github.com/charleyzhu/coredns_wormhole_plugin

作者很懒没写文档,coredns 插件支持 clash 规则。
fish3125
2022-11-01 15:36:06 +08:00
用 fake-ip 模式,需要两个条件
1.
需要把 dns 解析转发给 clash 的 dns 端口,这一步你使用 smardns ,需要在改软件配置转发部分或全部域名解析。然后才会按照你在 clash 里的规则来返回正常或者 fakeip 。我是用 adg 只 gfw 列表的给 clash ,然后让 clash 的 dns 返回的全是 fakeip 。
2.
如果用开源的 clash ,没有 tun 模式,但是我们可以把这两条写入防火墙,必须把 fakeip 转发给 clash 的 redir-port ,内部会自动完成正确域名的转换。
iptables -t nat -A OUTPUT -p tcp -d 198.18.0.0/16 -j REDIRECT --to-port 8088
iptables -t nat -A PREROUTING -p tcp -d 198.18.0.0/16 -j REDIRECT --to-port 8088#把 ip 段重定向到 clash 的 redir-port

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

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

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

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

© 2021 V2EX