完善极光配置,格式化代码

This commit is contained in:
2025-09-30 12:33:21 +08:00
parent 37f77cd7d0
commit 75f1a17669
14 changed files with 1084 additions and 714 deletions

23
scripts/jg/rmroute.rsc Normal file
View File

@@ -0,0 +1,23 @@
:foreach i in=[/ip firewall mangle find chain=prerouting] do={
:local ipComm [/ip firewall mangle get $i src-address]
:local activeConnLen [:len [/ppp active find address=$ipComm]]
:local routerlen [:len [/ip firewall mangle find src-address=$ipComm]]
:if ($activeConnLen=0) do={
/ip firewall mangle remove $i
}
:if ($routerlen>1) do={
/ip firewall mangle remove $i
}
}
:foreach i in=[/routing rule find] do={
:local ipComm [/routing rule get $i comment]
:local activeConnLen [:len [/ppp active find address=$ipComm]]
:local routerlen [:len [/routing rule find comment=$ipComm]]
:if ($activeConnLen=0) do={
/routing rule remove $i
}
:if ($routerlen>1) do={
/routing rule remove $i
}
}