分享下基于 mosdns 与 clash 的分流方案,大家看看行不行…

2023-03-03 11:32:38 +08:00
 js9528

dns:1 、dnsmasq 转发 mosdns

2 、mosdns 分流,国内域名走阿里和腾讯;国外直接转发 dns 到 clash 的 dns 端口

3 、clash 用 fake-ip 模式,开启全局代理到国外

4 、clash 最基本版本就行防火墙开启把 192.18.0.0/8 劫持到 clash 的 redir-port: 7892 端口

telegram 需要另外设置防火墙 telegram 的 ip 地址到 7892 端口

借鉴了很多论坛大佬的方法

7511 次点击
所在节点    DNS
29 条回复
js9528
2023-04-22 15:17:02 +08:00
@xuelide fake-ip 相关(具体看 fake-ip 的原理)。我说的方案不会劫持 ip ,所以 tg 纯 ip 连接需要劫持到 clash 的 redir 端口。ipset 没试过。
js9528
2023-04-22 15:18:02 +08:00
@xuelide 我这个方案,不会主动劫持 ip ,所以需要手动设置劫持 tg 的 ip
xuelide
2023-04-22 18:48:45 +08:00
厚脸皮的问一下,这个劫持 tg 到 clash 的 redir 端口怎么做?
xuelide
2023-04-25 17:02:39 +08:00
@mohumohu https://github.com/sbwml/luci-app-mosdns/issues/49
看来对 ipset 的理解有误···
mohumohu
2023-04-25 17:32:53 +08:00
@xuelide 没有错误啊,写入应答 IP 至 ipset ,然后把 ipset 用 iptables 转发到 clash 的端口就完事,比 fakeip 更原生。
linuxgo
221 天前
我用的 mosdns-v2raya ,目前功能正常,还在测试中
frankilla
175 天前
@linuxgo v2raya 怎么装啊,我跟着官方教程都装不上,气死。
linuxgo
175 天前
@frankilla #27 你用的什么设备呢
zwyyy456
143 天前
楼主的 mosdns 配置成功了吗?我是在 arm64 的 debian 上运行 mosdns ,但是 mosdns 虽然正常启动了,却没有正常工作

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

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

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

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

© 2021 V2EX