完善极光配置,格式化代码
This commit is contained in:
18
scripts/jg/up.rsc
Normal file
18
scripts/jg/up.rsc
Normal file
@@ -0,0 +1,18 @@
|
||||
:local num [/system script get num source]
|
||||
:local count [:len [/interface l2tp-client find ]]
|
||||
:local pnum 0
|
||||
|
||||
:set pnum ($num+1)
|
||||
/system script set num source="$pnum"
|
||||
|
||||
:if ($num>$count) do={
|
||||
:set num 1
|
||||
/system script set num source="1"
|
||||
}
|
||||
|
||||
/ip firewall mangle add action=mark-routing chain=prerouting new-routing-mark="r$num" src-address=$"remote-address"
|
||||
|
||||
:local user [/interface l2tp-client get [/interface l2tp-client find name="l2tp-out$num"] user ]
|
||||
|
||||
/tool fetch url="http://192.168.210.250:18702/server/ros/up/user/$user" mode=http
|
||||
/file remove "$user"
|
||||
Reference in New Issue
Block a user