summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-mwan3
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-mwan3')
-rw-r--r--applications/luci-app-mwan3/luasrc/controller/mwan3.lua2
-rw-r--r--applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_hotplugscript.lua51
-rw-r--r--applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua40
-rw-r--r--applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua10
-rw-r--r--applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua16
-rw-r--r--applications/luci-app-mwan3/po/ja/mwan3.po100
-rw-r--r--applications/luci-app-mwan3/po/templates/mwan3.pot69
-rw-r--r--applications/luci-app-mwan3/po/zh-cn/mwan3.po98
-rwxr-xr-xapplications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan37
9 files changed, 286 insertions, 107 deletions
diff --git a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua
index ca39c9bf30..c24beda281 100644
--- a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua
+++ b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua
@@ -29,6 +29,8 @@ function index()
entry({"admin", "network", "mwan", "configuration"},
alias("admin", "network", "mwan", "configuration", "interface"),
_("Configuration"), 20)
+ entry({"admin", "network", "mwan", "configuration", "globals"},
+ cbi("mwan/globalsconfig"),_("Globals"), 5).leaf = true
entry({"admin", "network", "mwan", "configuration", "interface"},
arcombine(cbi("mwan/interface"), cbi("mwan/interfaceconfig")),
_("Interfaces"), 10).leaf = true
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_hotplugscript.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_hotplugscript.lua
index 0e7b8b11d0..1b97080216 100644
--- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_hotplugscript.lua
+++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/advanced_hotplugscript.lua
@@ -1,55 +1,40 @@
-- ------ hotplug script configuration ------ --
fs = require "nixio.fs"
-sys = require "luci.sys"
ut = require "luci.util"
-script = "/etc/hotplug.d/iface/16-mwancustom"
-scriptBackup = "/etc/hotplug.d/iface/16-mwancustombak"
-
-if luci.http.formvalue("cbid.luci.1._restorebak") then -- restore button has been clicked
- luci.http.redirect(luci.dispatcher.build_url("admin/network/mwan/advanced/hotplugscript") .. "?restore=yes")
-elseif luci.http.formvalue("restore") == "yes" then -- restore script from backup
- os.execute("cp -f " .. scriptBackup .. " " .. script)
-end
-
+script = "/etc/mwan3.user"
m5 = SimpleForm("luci", nil)
m5:append(Template("mwan/advanced_hotplugscript")) -- highlight current tab
f = m5:section(SimpleSection, nil,
- translate("This section allows you to modify the contents of /etc/hotplug.d/iface/16-mwancustom<br />" ..
- "This is useful for running system commands and/or scripts based on interface ifup or ifdown hotplug events<br /><br />" ..
+ translate("This section allows you to modify the content of \"/etc/mwan3.user\".<br />" ..
+ "The file is also preserved during sysupgrade.<br />" ..
+ "<br />" ..
"Notes:<br />" ..
- "The first line of the script must be &#34;#!/bin/sh&#34; without quotes<br />" ..
- "Lines beginning with # are comments and are not executed<br /><br />" ..
- "Available variables:<br />" ..
- "$ACTION is the hotplug event (ifup, ifdown)<br />" ..
- "$INTERFACE is the interface name (wan1, wan2, etc.)<br />" ..
- "$DEVICE is the device name attached to the interface (eth0.1, eth1, etc.)"))
-
-
-restore = f:option(Button, "_restorebak", translate("Restore default hotplug script"))
- restore.inputtitle = translate("Restore...")
- restore.inputstyle = "apply"
+ "This file is interpreted as a shell script.<br />" ..
+ "The first line of the script must be &#34;#!/bin/sh&#34; without quotes.<br />" ..
+ "Lines beginning with # are comments and are not executed.<br />" ..
+ "Put your custom mwan3 action here, they will<br />" ..
+ "be executed with each netifd hotplug interface event<br />" ..
+ "on interfaces for which mwan3 is enabled.<br />" ..
+ "<br />" ..
+ "There are three main environment variables that are passed to this script.<br />" ..
+ "<br />" ..
+ "$ACTION Either \"ifup\" or \"ifdown\"<br />" ..
+ "$INTERFACE Name of the interface which went up or down (e.g. \"wan\" or \"wwan\")<br />" ..
+ "$DEVICE Physical device name which interface went up or down (e.g. \"eth0\" or \"wwan0\")<br />" ..
+ "<br />"))
t = f:option(TextValue, "lines")
t.rmempty = true
t.rows = 20
-
function t.cfgvalue()
- local hps = fs.readfile(script)
- if not hps or hps == "" then -- if script does not exist or is blank restore from backup
- sys.call("cp -f " .. scriptBackup .. " " .. script)
- return fs.readfile(script)
- else
- return hps
- end
+ return fs.readfile(script)
end
-
function t.write(self, section, data) -- format and write new data to script
return fs.writefile(script, ut.trim(data:gsub("\r\n", "\n")) .. "\n")
end
-
return m5
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua
new file mode 100644
index 0000000000..919ed46cd4
--- /dev/null
+++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua
@@ -0,0 +1,40 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2017 Florian Eckert <fe@dev.tdt.de>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+local net = require "luci.model.network".init()
+
+m = Map("mwan3")
+
+s = m:section(NamedSection, "globals", "globals", translate("Globals mwan3 options"))
+n = s:option(ListValue, "local_source",
+ translate("Local source interface"),
+ translate("Use the IP address of this interface as source IP address for traffic initiated by the router itself"))
+n:value("none")
+n.default = "none"
+for _, net in ipairs(net:get_networks()) do
+ if net:name() ~= "loopback" then
+ n:value(net:name())
+ end
+end
+n.rmempty = false
+
+mask = s:option(
+ Value,
+ "mmx_mask",
+ translate("Firewall mask"),
+ translate("Enter value in hex, starting with <code>0x</code>"))
+mask.datatype = "hex(4)"
+mask.default = "0xff00"
+
+return m
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua
index aeabc63616..c8c122ad48 100644
--- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua
+++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua
@@ -147,6 +147,16 @@ track_ip = mwan_interface:option(DummyValue, "track_ip", translate("Tracking IP"
end
end
+track_method = mwan_interface:option(DummyValue, "track_method", translate("Tracking method"))
+ track_method.rawhtml = true
+ function track_method.cfgvalue(self, s)
+ if tracked then
+ return self.map:get(s, "track_method") or "&#8212;"
+ else
+ return "&#8212;"
+ end
+ end
+
reliability = mwan_interface:option(DummyValue, "reliability", translate("Tracking reliability"))
reliability.rawhtml = true
function reliability.cfgvalue(self, s)
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua
index 2b46376399..0318091d6c 100644
--- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua
+++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua
@@ -102,6 +102,12 @@ enabled = mwan_interface:option(ListValue, "enabled", translate("Enabled"))
enabled:value("1", translate("Yes"))
enabled:value("0", translate("No"))
+initial_state = mwan_interface:option(ListValue, "initial_state", translate("Initial state"),
+ translate("Expect interface state on up event"))
+ initial_state.default = "online"
+ initial_state:value("online", translate("Online"))
+ initial_state:value("offline", translate("Offline"))
+
family = mwan_interface:option(ListValue, "family", translate("Internet Protocol"))
family.default = "ipv4"
family:value("ipv4", translate("IPv4"))
@@ -111,6 +117,12 @@ track_ip = mwan_interface:option(DynamicList, "track_ip", translate("Tracking ho
translate("This hostname or IP address will be pinged to determine if the link is up or down. Leave blank to assume interface is always online"))
track_ip.datatype = "host"
+track_method = mwan_interface:option(ListValue, "track_method", translate("Tracking method"))
+ track_method.default = "ping"
+ track_method:value("ping")
+ track_method:value("arping")
+ track_method:value("httping")
+
reliability = mwan_interface:option(Value, "reliability", translate("Tracking reliability"),
translate("Acceptable values: 1-100. This many Tracking IP addresses must respond for the link to be deemed up"))
reliability.datatype = "range(1, 100)"
@@ -183,6 +195,10 @@ failure = mwan_interface:option(Value, "failure_interval", translate("Failure in
failure:value("1800", translatef("%d minutes", 30))
failure:value("3600", translatef("%d hour", 1))
+keep_failure = mwan_interface:option(Flag, "keep_failure_interval", translate("Keep failure interval"),
+ translate("Keep ping failure interval during failure state"))
+ keep_failure.default = keep_failure.disabled
+
recovery = mwan_interface:option(Value, "recovery_interval", translate("Recovery interval"),
translate("Ping interval during failure recovering"))
recovery.default = "5"
diff --git a/applications/luci-app-mwan3/po/ja/mwan3.po b/applications/luci-app-mwan3/po/ja/mwan3.po
index f6a70c3561..72c5dddab9 100644
--- a/applications/luci-app-mwan3/po/ja/mwan3.po
+++ b/applications/luci-app-mwan3/po/ja/mwan3.po
@@ -88,21 +88,36 @@ msgstr ""
msgid "Enabled"
msgstr "有効"
+msgid "Enter value in hex, starting with <code>0x</code>"
+msgstr "<code>0x</code> で始まる16進数の値を入力してください。"
+
msgid "Error collecting troubleshooting information"
msgstr "トラブルシューティング情報の収集エラー"
msgid "Errors"
msgstr "エラー"
+msgid "Expect interface state on up event"
+msgstr "Up イベント時に予想されるインターフェースの状態です。"
+
msgid "Failure interval"
msgstr "障害検出 インターバル"
+msgid "Firewall mask"
+msgstr "ファイアウォール マスク"
+
msgid "Flush conntrack table"
msgstr ""
msgid "Flush global firewall conntrack table on interface events"
msgstr ""
+msgid "Globals"
+msgstr "全般"
+
+msgid "Globals mwan3 options"
+msgstr "MWAN3 全般オプション"
+
msgid "Hotplug Script"
msgstr "ホットプラグ スクリプト"
@@ -121,6 +136,9 @@ msgstr "IPv4"
msgid "IPv6"
msgstr "IPv6"
+msgid "Initial state"
+msgstr "初期状態"
+
msgid "Interface"
msgstr "インターフェース"
@@ -144,6 +162,12 @@ msgstr "インターフェース"
msgid "Internet Protocol"
msgstr "インターネット プロトコル"
+msgid "Keep failure interval"
+msgstr ""
+
+msgid "Keep ping failure interval during failure state"
+msgstr ""
+
msgid "Last 50 MWAN systemlog entries. Newest entries sorted at the top :"
msgstr "直近の MWAN システムログ(50行)です。一番上が最新の行です:"
@@ -156,6 +180,9 @@ msgstr "負荷分散"
msgid "Loading"
msgstr "読込中"
+msgid "Local source interface"
+msgstr ""
+
msgid "MWAN Config"
msgstr "MWAN 設定"
@@ -277,6 +304,9 @@ msgstr "プロトコルが設定されていません"
msgid "Offline"
msgstr "オフライン"
+msgid "Online"
+msgstr "オンライン"
+
msgid "Online (tracking active)"
msgstr "オンライン(追跡実行中)"
@@ -296,7 +326,7 @@ msgid "Ping interval"
msgstr "Ping インターバル"
msgid "Ping interval during failure detection"
-msgstr "障害検出動作中の Ping 実行間隔です。"
+msgstr "障害検出中の Ping 実行間隔です。"
msgid "Ping interval during failure recovering"
msgstr "障害復旧中の Ping 実行間隔です。"
@@ -346,12 +376,6 @@ msgstr "障害復旧 インターバル"
msgid "Restart MWAN"
msgstr "MWAN の再起動"
-msgid "Restore default hotplug script"
-msgstr "デフォルトのホットプラグ スクリプトの復元"
-
-msgid "Restore..."
-msgstr "復元..."
-
msgid "Rule"
msgstr "ルール"
@@ -419,6 +443,31 @@ msgstr ""
"に対して Ping の送信が行われます。常にオンラインとする場合、空欄のままにしま"
"す。"
+msgid ""
+"This section allows you to modify the content of \"/etc/mwan3.user\".<br /"
+">The file is also preserved during sysupgrade.<br /><br />Notes:<br />This "
+"file is interpreted as a shell script.<br />The first line of the script "
+"must be &#34;#!/bin/sh&#34; without quotes.<br />Lines beginning with # are "
+"comments and are not executed.<br />Put your custom mwan3 action here, they "
+"will<br />be executed with each netifd hotplug interface event<br />on "
+"interfaces for which mwan3 is enabled.<br /><br />There are three main "
+"environment variables that are passed to this script.<br /><br />$ACTION "
+"Either \"ifup\" or \"ifdown\"<br />$INTERFACE Name of the interface which "
+"went up or down (e.g. \"wan\" or \"wwan\")<br />$DEVICE Physical device name "
+"which interface went up or down (e.g. \"eth0\" or \"wwan0\")<br /><br />"
+msgstr ""
+"このセクションでは、 \"/etc/mwan3.user\" の内容を変更することができます。"
+"<br />このファイルは、 sysupgrade 時に保持されます。<br /><br />注意: <br />"
+"このファイルは、シェルスクリプトとして解釈されます。<br />スクリプトの1行目"
+"は、&#34;#!bin/sh&#34; である必要があります(クォーテーション不要)。<br /># "
+"で始まる行はコメントであり、実行されません。<br />mwan3 のカスタム動作をここ"
+"に入力してください。これらは、 mwan3 が有効なインターフェースの<br />netifd "
+"ホットプラグ インターフェース イベント毎に実行されます。<br /><br />主に3つの"
+"環境変数が利用可能です。<br /><br />$ACTION - \"ifup\" および \"ifdown\"<br /"
+">$INTERFACE - Up または Down が行われたインターフェース名(例: \"wan\" や "
+"\"wwan\")<br />$DEVICE - Up または Down が行われた物理デバイス名(例: "
+"\"eth0\" や \"wwan0\")<br /><br />"
+
msgid "This section allows you to modify the contents of /etc/config/mwan3"
msgstr ""
"このセクションでは、 /etc/config/mwan3 の内容を変更することができます。"
@@ -431,32 +480,15 @@ msgid "This section allows you to modify the contents of /etc/config/wireless"
msgstr ""
"このセクションでは、 /etc/config/wireless の内容を変更することができます。"
-msgid ""
-"This section allows you to modify the contents of /etc/hotplug.d/iface/16-"
-"mwancustom<br />This is useful for running system commands and/or scripts "
-"based on interface ifup or ifdown hotplug events<br /><br />Notes:<br />The "
-"first line of the script must be &#34;#!/bin/sh&#34; without quotes<br /"
-">Lines beginning with # are comments and are not executed<br /><br /"
-">Available variables:<br />$ACTION is the hotplug event (ifup, ifdown)<br />"
-"$INTERFACE is the interface name (wan1, wan2, etc.)<br />$DEVICE is the "
-"device name attached to the interface (eth0.1, eth1, etc.)"
-msgstr ""
-"このセクションでは、 /etc/hotplug.d/iface/16-mwancustom の内容を変更すること"
-"ができます。<br />これは、インターフェースの ifup または ifdown ホットプラグ "
-"イベント時にシステムコマンドまたはスクリプト、もしくはその両方を実行すること"
-"に役立ちます。<br /><br />注意:<br />スクリプトの1行目は、&#34;#!bin/sh&#34; "
-"である必要があります(クオーテーション不要)。<br /># で始まる行はコメントと"
-"して認識され、実行されません。<br /><br />利用可能な変数:<br />$ACTION - ホッ"
-"トプラグ イベント (ifup, ifdown)<br />$INTERFACE - インターフェース名(wan1, "
-"wan2, その他)<br />$DEVICE - インターフェースにアタッチされたデバイスの名前"
-"(eth0.1, eth1, その他)"
-
msgid "Tracking IP"
msgstr "追跡 IP"
msgid "Tracking hostname or IP address"
msgstr "追跡ホスト名または IP アドレス"
+msgid "Tracking method"
+msgstr "追跡方式"
+
msgid "Tracking reliability"
msgstr "追跡の信頼性"
@@ -477,6 +509,13 @@ msgstr "トラブルシューティング"
msgid "Troubleshooting Data"
msgstr "トラブルシューティング データ"
+msgid ""
+"Use the IP address of this interface as source IP address for traffic "
+"initiated by the router itself"
+msgstr ""
+"ルーター自身によって発生するトラフィックのアクセス元 IP アドレスとして、この"
+"インターフェースの IP アドレスが使用されます。"
+
msgid "View the contents of /etc/protocols for protocol descriptions"
msgstr "プロトコルの説明については、 /etc/protocols の内容を確認してください。"
@@ -624,10 +663,3 @@ msgstr "停止"
msgid "unreachable (reject)"
msgstr "unreachable (reject)"
-
-#~ msgid ""
-#~ "This IP address will be pinged to dermine if the link is up or down. "
-#~ "Leave blank to assume interface is always online"
-#~ msgstr ""
-#~ "これらは、リンクの Up または Down を判定するために Ping が送信されるIP ア"
-#~ "ドレスです。常にオンラインとする場合、空欄のままにします。"
diff --git a/applications/luci-app-mwan3/po/templates/mwan3.pot b/applications/luci-app-mwan3/po/templates/mwan3.pot
index 3d25e844ac..e63d8adc2e 100644
--- a/applications/luci-app-mwan3/po/templates/mwan3.pot
+++ b/applications/luci-app-mwan3/po/templates/mwan3.pot
@@ -73,21 +73,36 @@ msgstr ""
msgid "Enabled"
msgstr ""
+msgid "Enter value in hex, starting with <code>0x</code>"
+msgstr ""
+
msgid "Error collecting troubleshooting information"
msgstr ""
msgid "Errors"
msgstr ""
+msgid "Expect interface state on up event"
+msgstr ""
+
msgid "Failure interval"
msgstr ""
+msgid "Firewall mask"
+msgstr ""
+
msgid "Flush conntrack table"
msgstr ""
msgid "Flush global firewall conntrack table on interface events"
msgstr ""
+msgid "Globals"
+msgstr ""
+
+msgid "Globals mwan3 options"
+msgstr ""
+
msgid "Hotplug Script"
msgstr ""
@@ -106,6 +121,9 @@ msgstr ""
msgid "IPv6"
msgstr ""
+msgid "Initial state"
+msgstr ""
+
msgid "Interface"
msgstr ""
@@ -127,6 +145,12 @@ msgstr ""
msgid "Internet Protocol"
msgstr ""
+msgid "Keep failure interval"
+msgstr ""
+
+msgid "Keep ping failure interval during failure state"
+msgstr ""
+
msgid "Last 50 MWAN systemlog entries. Newest entries sorted at the top :"
msgstr ""
@@ -139,6 +163,9 @@ msgstr ""
msgid "Loading"
msgstr ""
+msgid "Local source interface"
+msgstr ""
+
msgid "MWAN Config"
msgstr ""
@@ -245,6 +272,9 @@ msgstr ""
msgid "Offline"
msgstr ""
+msgid "Online"
+msgstr ""
+
msgid "Online (tracking active)"
msgstr ""
@@ -306,12 +336,6 @@ msgstr ""
msgid "Restart MWAN"
msgstr ""
-msgid "Restore default hotplug script"
-msgstr ""
-
-msgid "Restore..."
-msgstr ""
-
msgid "Rule"
msgstr ""
@@ -365,6 +389,20 @@ msgid ""
"down. Leave blank to assume interface is always online"
msgstr ""
+msgid ""
+"This section allows you to modify the content of \"/etc/mwan3.user\".<br /"
+">The file is also preserved during sysupgrade.<br /><br />Notes:<br />This "
+"file is interpreted as a shell script.<br />The first line of the script "
+"must be &#34;#!/bin/sh&#34; without quotes.<br />Lines beginning with # are "
+"comments and are not executed.<br />Put your custom mwan3 action here, they "
+"will<br />be executed with each netifd hotplug interface event<br />on "
+"interfaces for which mwan3 is enabled.<br /><br />There are three main "
+"environment variables that are passed to this script.<br /><br />$ACTION "
+"Either \"ifup\" or \"ifdown\"<br />$INTERFACE Name of the interface which "
+"went up or down (e.g. \"wan\" or \"wwan\")<br />$DEVICE Physical device name "
+"which interface went up or down (e.g. \"eth0\" or \"wwan0\")<br /><br />"
+msgstr ""
+
msgid "This section allows you to modify the contents of /etc/config/mwan3"
msgstr ""
@@ -374,23 +412,15 @@ msgstr ""
msgid "This section allows you to modify the contents of /etc/config/wireless"
msgstr ""
-msgid ""
-"This section allows you to modify the contents of /etc/hotplug.d/iface/16-"
-"mwancustom<br />This is useful for running system commands and/or scripts "
-"based on interface ifup or ifdown hotplug events<br /><br />Notes:<br />The "
-"first line of the script must be &#34;#!/bin/sh&#34; without quotes<br /"
-">Lines beginning with # are comments and are not executed<br /><br /"
-">Available variables:<br />$ACTION is the hotplug event (ifup, ifdown)<br />"
-"$INTERFACE is the interface name (wan1, wan2, etc.)<br />$DEVICE is the "
-"device name attached to the interface (eth0.1, eth1, etc.)"
-msgstr ""
-
msgid "Tracking IP"
msgstr ""
msgid "Tracking hostname or IP address"
msgstr ""
+msgid "Tracking method"
+msgstr ""
+
msgid "Tracking reliability"
msgstr ""
@@ -408,6 +438,11 @@ msgstr ""
msgid "Troubleshooting Data"
msgstr ""
+msgid ""
+"Use the IP address of this interface as source IP address for traffic "
+"initiated by the router itself"
+msgstr ""
+
msgid "View the contents of /etc/protocols for protocol descriptions"
msgstr ""
diff --git a/applications/luci-app-mwan3/po/zh-cn/mwan3.po b/applications/luci-app-mwan3/po/zh-cn/mwan3.po
index 1e0f34f088..b133e8b1d9 100644
--- a/applications/luci-app-mwan3/po/zh-cn/mwan3.po
+++ b/applications/luci-app-mwan3/po/zh-cn/mwan3.po
@@ -76,21 +76,36 @@ msgstr "当 Ping 成功次数达到这个数值后,已经被认为离线的接
msgid "Enabled"
msgstr "启用"
+msgid "Enter value in hex, starting with <code>0x</code>"
+msgstr ""
+
msgid "Error collecting troubleshooting information"
msgstr "收集故障排除信息时出错"
msgid "Errors"
msgstr "错误"
+msgid "Expect interface state on up event"
+msgstr ""
+
msgid "Failure interval"
msgstr "故障检测间隔"
+msgid "Firewall mask"
+msgstr ""
+
msgid "Flush conntrack table"
msgstr "刷新连接跟踪表"
msgid "Flush global firewall conntrack table on interface events"
msgstr "在接口事件触发时刷新全局防火墙连接跟踪表"
+msgid "Globals"
+msgstr ""
+
+msgid "Globals mwan3 options"
+msgstr ""
+
msgid "Hotplug Script"
msgstr "Hotplug 脚本"
@@ -109,6 +124,9 @@ msgstr "IPv4"
msgid "IPv6"
msgstr "IPv6"
+msgid "Initial state"
+msgstr ""
+
msgid "Interface"
msgstr "接口"
@@ -130,6 +148,12 @@ msgstr "接口"
msgid "Internet Protocol"
msgstr "互联网协议"
+msgid "Keep failure interval"
+msgstr ""
+
+msgid "Keep ping failure interval during failure state"
+msgstr ""
+
msgid "Last 50 MWAN systemlog entries. Newest entries sorted at the top :"
msgstr "最近 50 条 MWAN 系统日志,最新条目排在顶部:"
@@ -142,6 +166,9 @@ msgstr "负载均衡"
msgid "Loading"
msgstr "载入中"
+msgid "Local source interface"
+msgstr ""
+
msgid "MWAN Config"
msgstr "MWAN 配置文件"
@@ -260,6 +287,9 @@ msgstr "未指定协议"
msgid "Offline"
msgstr "离线"
+msgid "Online"
+msgstr ""
+
msgid "Online (tracking active)"
msgstr "在线(追踪启用中)"
@@ -326,12 +356,6 @@ msgstr "故障恢复间隔"
msgid "Restart MWAN"
msgstr "重启 MWAN"
-msgid "Restore default hotplug script"
-msgstr "恢复默认的 hotplug 脚本"
-
-msgid "Restore..."
-msgstr "恢复..."
-
msgid "Rule"
msgstr "规则"
@@ -392,6 +416,20 @@ msgid ""
"down. Leave blank to assume interface is always online"
msgstr "通过 ping 此主机或 IP 地址来确定链路是否在线。留空则认为接口始终在线"
+msgid ""
+"This section allows you to modify the content of \"/etc/mwan3.user\".<br /"
+">The file is also preserved during sysupgrade.<br /><br />Notes:<br />This "
+"file is interpreted as a shell script.<br />The first line of the script "
+"must be &#34;#!/bin/sh&#34; without quotes.<br />Lines beginning with # are "
+"comments and are not executed.<br />Put your custom mwan3 action here, they "
+"will<br />be executed with each netifd hotplug interface event<br />on "
+"interfaces for which mwan3 is enabled.<br /><br />There are three main "
+"environment variables that are passed to this script.<br /><br />$ACTION "
+"Either \"ifup\" or \"ifdown\"<br />$INTERFACE Name of the interface which "
+"went up or down (e.g. \"wan\" or \"wwan\")<br />$DEVICE Physical device name "
+"which interface went up or down (e.g. \"eth0\" or \"wwan0\")<br /><br />"
+msgstr ""
+
msgid "This section allows you to modify the contents of /etc/config/mwan3"
msgstr "这里允许你修改 /etc/config/mwan3 的内容"
@@ -401,29 +439,15 @@ msgstr "这里允许你修改 /etc/config/network 的内容"
msgid "This section allows you to modify the contents of /etc/config/wireless"
msgstr "这里允许你修改 /etc/config/wireless 的内容"
-msgid ""
-"This section allows you to modify the contents of /etc/hotplug.d/iface/16-"
-"mwancustom<br />This is useful for running system commands and/or scripts "
-"based on interface ifup or ifdown hotplug events<br /><br />Notes:<br />The "
-"first line of the script must be &#34;#!/bin/sh&#34; without quotes<br /"
-">Lines beginning with # are comments and are not executed<br /><br /"
-">Available variables:<br />$ACTION is the hotplug event (ifup, ifdown)<br />"
-"$INTERFACE is the interface name (wan1, wan2, etc.)<br />$DEVICE is the "
-"device name attached to the interface (eth0.1, eth1, etc.)"
-msgstr ""
-"这里允许你修改 /etc/hotplug.d/iface/16-mwancustom 的内容<br />这可以在接口 "
-"ifup 或 ifdown Hotplug 事件时运行系统命令或脚本<br /><br />注意:<br />脚本的"
-"第一行必须是 &#34;#!/bin/sh&#34; 不含引号<br />以#开头的行是注释,不会执行"
-"<br /><br />可用变量:<br />$ACTION 是 Hotplug 事件(ifup, ifdown)<br />"
-"$INTERFACE 是接口名称(wan1、wan2 等)<br />$DEVICE 是连接到接口的设备名称 "
-"(eth0.1、eth1 等)"
-
msgid "Tracking IP"
msgstr "追踪的 IP"
msgid "Tracking hostname or IP address"
msgstr "追踪的主机或 IP 地址"
+msgid "Tracking method"
+msgstr ""
+
msgid "Tracking reliability"
msgstr "追踪可靠性"
@@ -443,6 +467,11 @@ msgstr "故障排除"
msgid "Troubleshooting Data"
msgstr "故障排除数据"
+msgid ""
+"Use the IP address of this interface as source IP address for traffic "
+"initiated by the router itself"
+msgstr ""
+
msgid "View the contents of /etc/protocols for protocol descriptions"
msgstr "请查看 /etc/protocols 获取可选协议详情"
@@ -561,3 +590,26 @@ msgstr ""
msgid "unreachable (reject)"
msgstr "不可达(拒绝)"
+
+#~ msgid "Restore default hotplug script"
+#~ msgstr "恢复默认的 hotplug 脚本"
+
+#~ msgid "Restore..."
+#~ msgstr "恢复..."
+
+#~ msgid ""
+#~ "This section allows you to modify the contents of /etc/hotplug.d/iface/16-"
+#~ "mwancustom<br />This is useful for running system commands and/or scripts "
+#~ "based on interface ifup or ifdown hotplug events<br /><br />Notes:<br /"
+#~ ">The first line of the script must be &#34;#!/bin/sh&#34; without "
+#~ "quotes<br />Lines beginning with # are comments and are not executed<br /"
+#~ "><br />Available variables:<br />$ACTION is the hotplug event (ifup, "
+#~ "ifdown)<br />$INTERFACE is the interface name (wan1, wan2, etc.)<br />"
+#~ "$DEVICE is the device name attached to the interface (eth0.1, eth1, etc.)"
+#~ msgstr ""
+#~ "这里允许你修改 /etc/hotplug.d/iface/16-mwancustom 的内容<br />这可以在接"
+#~ "口 ifup 或 ifdown Hotplug 事件时运行系统命令或脚本<br /><br />注意:<br />"
+#~ "脚本的第一行必须是 &#34;#!/bin/sh&#34; 不含引号<br />以#开头的行是注释,"
+#~ "不会执行<br /><br />可用变量:<br />$ACTION 是 Hotplug 事件(ifup, ifdown)"
+#~ "<br />$INTERFACE 是接口名称(wan1、wan2 等)<br />$DEVICE 是连接到接口的设"
+#~ "备名称 (eth0.1、eth1 等)"
diff --git a/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3 b/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3
index ff9a229edd..50c65ad678 100755
--- a/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3
+++ b/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3
@@ -8,6 +8,13 @@ uci -q batch <<-EOF >/dev/null
commit ucitrack
EOF
+uci -q get mwan3.globals >/dev/null || {
+ uci -q add mwan3 globals >/dev/null
+ uci -q rename mwan3.@globals[-1]="globals" >/dev/null
+ uci -q set mwan3.globals.local_source="none" >/dev/null
+ uci commit mwan3
+}
+
# remove LuCI cache
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache