AI 帮我生成的 RouterOS mangle 实现 国内外分流失败了,可以抄一下大家的规则吗?

6 月 28 日
 Debug1998
3160 次点击
所在节点    宽带症候群
6 条回复
mooyo
6 月 28 日
用 ROS 是不行的 怎么解决 DNS 污染?
terrancesiu
6 月 28 日
直接 bgp 吧,再弄个 dns 转发规则
Ipsum
6 月 28 日
这需求不是比 pcc 还要简单吗?
Debug1998
6 月 29 日
@terrancesiu 换 OSPF 的方式了,BGP 后续再研究研究。谢谢~
ayasakinagi
6 月 29 日
写个 dns 插件, 向 address list 写地址
nivalxer
6 月 30 日
我目前用的是 Docker 跑的 mihomo 和 paopaodns 。其中 mihomo 地址是 10.0.0.2 。paopaodns 是递归 dns ,可以解决 dns 污染问题。以下是部分关键脚本。
地址表:NoProxyLocalIP 可以写入不需要标记给 mihomo 的内网 IP 。
#IP 订阅脚本
/system script
add dont-require-permissions=no name=CN_IPAddress_Update owner=admin policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="/\
tool fetch url=\"https://ghfast.top/https://raw.githubusercontent.com/PaPe\
rseller/chn-iplist/master/cn.rsc\" \\\
\ndst-path=cn.rsc\
\n/import file-name=cn.rsc\
\n/file remove [find name=\"cn.rsc\"]\
\n:log info (\"update done\")"
#定时执行
/system scheduler
add comment=CN_IPAddress_Update interval=3d name=CN_IPAddress_Update \
on-event=CN_IPAddress_Update policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=2024-11-03 start-time=05:00:00

#防火墙
/ip firewall mangle
add action=change-mss chain=forward comment="defconf: fix IPv4 mss for WAN" \
new-mss=clamp-to-pmtu protocol=tcp tcp-flags=syn
add action=accept chain=prerouting comment="Accept Clash" in-interface=\
bridge1 src-address=10.0.0.2
add action=mark-routing chain=prerouting comment="Mark Clash" \
dst-address-list=!CN dst-address-type=!local new-routing-mark=clash \
protocol=!icmp src-address-list=!NoProxyLocalIP

#路由
/routing table
add disabled=no fib name=clash
/ip route
add check-gateway=ping comment="To mihomo" disabled=no distance=1 \
dst-address=0.0.0.0/0 gateway=10.0.0.2 routing-table=clash scope=30 \
target-scope=10

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

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

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

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

© 2021 V2EX