更新 main.go
This commit is contained in:
24
main.go
24
main.go
@@ -563,10 +563,7 @@ func handleRoot(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
# 设置每周自动执行(每周日凌晨3点)
|
||||
/system scheduler add name=auto-update-chnroute \\
|
||||
interval=7d \\
|
||||
on-event="/system script run update-chnroute" \\
|
||||
start-time=03:00:00</pre>
|
||||
/system scheduler add name=auto-update-chnroute interval=7d00:00:00 on-event="/system script run update-chnroute" start-time=03:00:00</pre>
|
||||
</div>
|
||||
|
||||
<h3 style="margin-top: 30px;">IPv6 导入脚本</h3>
|
||||
@@ -579,6 +576,25 @@ func handleRoot(w http.ResponseWriter, r *http.Request) {
|
||||
# 验证导入
|
||||
/ipv6 firewall address-list print count-only where list=chnroute6</pre>
|
||||
</div>
|
||||
|
||||
<h3 style="margin-top: 30px;">IPv6 自动更新脚本</h3>
|
||||
<div class="code-container">
|
||||
<button class="copy-btn" onclick="copyCode('code4')">📋 复制</button>
|
||||
<pre id="code4"># 创建 IPv6 更新脚本
|
||||
/system script add name=update-chnroute-v6 source={
|
||||
:log info "开始更新 CHNRoute IPv6"
|
||||
/file remove [find name="chnroute_v6.rsc"]
|
||||
/tool fetch url="%s/chnroute_v6.rsc" mode=%s
|
||||
:delay 3s
|
||||
/ipv6 firewall address-list remove [find list=chnroute6]
|
||||
/import chnroute_v6.rsc
|
||||
:local count [/ipv6 firewall address-list print count-only where list=chnroute6]
|
||||
:log info ("CHNRoute IPv6 更新完成,共 " . $count . " 条")
|
||||
}
|
||||
|
||||
# 设置每周日凌晨3点自动执行
|
||||
/system scheduler add name=auto-update-chnroute-v6 interval=7d00:00:00 on-event="/system script run update-chnroute-v6" start-time=03:00:00</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 服务状态 -->
|
||||
|
||||
Reference in New Issue
Block a user