local fs = require("nixio.fs")
local util = require("luci.util")
-local template = require("luci.template")
+local templ = require("luci.template")
local i18n = require("luci.i18n")
function index()
entry({"admin", "services", "adblock", "advanced", "blacklist"}, cbi("adblock/blacklist_tab"), _("Edit Blacklist"), 110).leaf = true
entry({"admin", "services", "adblock", "advanced", "whitelist"}, cbi("adblock/whitelist_tab"), _("Edit Whitelist"), 120).leaf = true
entry({"admin", "services", "adblock", "advanced", "configuration"}, cbi("adblock/configuration_tab"), _("Edit Configuration"), 130).leaf = true
- entry({"admin", "services", "adblock", "advanced", "query"}, call("query"), _("Query domains"), 140).leaf = true
+ entry({"admin", "services", "adblock", "advanced", "query"}, template("adblock/query"), _("Query domains"), 140).leaf = true
entry({"admin", "services", "adblock", "advanced", "result"}, call("queryData"), nil, 150).leaf = true
end
function logread()
local logfile = util.trim(util.exec("logread -e 'adblock'"))
- template.render("adblock/logread", {title = i18n.translate("Adblock Logfile"), content = logfile})
-end
-
-function query()
- template.render("adblock/query", {title = i18n.translate("Adblock Domain Query")})
+ templ.render("adblock/logread", {title = i18n.translate("Adblock Logfile"), content = logfile})
end
function queryData(domain)
m = SimpleForm("input", nil)
m:append(Template("adblock/config_css"))
+m.submit = translate("Save")
m.reset = false
s = m:section(SimpleSection, nil,
m = SimpleForm("input", nil)
m:append(Template("adblock/config_css"))
+m.submit = translate("Save")
m.reset = false
s = m:section(SimpleSection, nil,
dnspath = "/var/lib/unbound"
elseif backend == "named" then
dnspath = "/var/lib/bind"
+ elseif backend == "kresd" then
+ dnspath = "/tmp/kresd"
end
end
end
e2.default = e2.disabled
e2.rmempty = false
-e3 = e:option(Flag, "adb_manmode", translate("Manual mode"),
+e3 = e:option(Flag, "adb_manmode", translate("Manual / Backup mode"),
translate("Do not automatically update blocklists during startup, use blocklist backups instead."))
e3.default = e3.disabled
e3.rmempty = false
m = SimpleForm("input", nil)
m:append(Template("adblock/config_css"))
+m.submit = translate("Save")
m.reset = false
s = m:section(SimpleSection, nil,
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 2.0.2\n"
+"X-Generator: Poedit 2.0.3\n"
"Language: ja\n"
msgid "Adblock"
msgstr "Adblock"
-msgid "Adblock Domain Query"
-msgstr "Adblock ドメイン検索"
-
msgid "Adblock Logfile"
msgstr "Adblock ログファイル"
msgid "Loading"
msgstr "読込中"
-msgid "Manual mode"
-msgstr "マニュアル モード"
+msgid "Manual / Backup mode"
+msgstr "手動 / バックアップ モード"
msgid "No"
msgstr "いいえ"
msgid "SSL req."
msgstr "SSL 必須"
+msgid "Save"
+msgstr "保存"
+
msgid ""
"Space separated list of interfaces that trigger adblock processing. To "
"disable event driven (re-)starts remove all entries."
msgstr "ステータス"
msgid "Suspend / Resume adblock"
-msgstr "Adblock の一時停止/再開"
+msgstr "Adblock の一時停止 / 再開"
msgid "Suspend adblock"
msgstr "Adblock の一時停止"
msgid "The file size is too large for online editing in LuCI (> 512 KB)."
msgstr ""
-"ファイル サイズが大きすぎるため、 LuCI 上でオンライン編集できません(> "
-"512 KB)。"
+"ファイル サイズが大きすぎる(512 KB超)ため、 LuCI 上でオンライン編集できませ"
+"ん。"
msgid ""
"This form allows you to modify the content of the adblock blacklist (%s)."
msgstr "ログファイルを見る"
msgid "Waiting for command to complete..."
-msgstr "コマンドの完了をお待ちください..."
+msgstr "コマンド実行中です..."
msgid "Yes"
msgstr "はい"
msgid "Adblock"
msgstr "Adblock"
-msgid "Adblock Domain Query"
-msgstr ""
-
msgid "Adblock Logfile"
msgstr ""
msgid "Loading"
msgstr ""
-msgid "Manual mode"
+msgid "Manual / Backup mode"
msgstr ""
msgid "No"
msgid "SSL req."
msgstr ""
+msgid "Save"
+msgstr ""
+
msgid ""
"Space separated list of interfaces that trigger adblock processing. To "
"disable event driven (re-)starts remove all entries."
msgid "Adblock"
msgstr "Adblock"
-msgid "Adblock Domain Query"
-msgstr ""
-
msgid "Adblock Logfile"
msgstr "Adblock's loggfil"
msgid "Loading"
msgstr "Laddar"
-msgid "Manual mode"
+msgid "Manual / Backup mode"
msgstr ""
msgid "No"
msgid "SSL req."
msgstr ""
+msgid "Save"
+msgstr ""
+
msgid ""
"Space separated list of interfaces that trigger adblock processing. To "
"disable event driven (re-)starts remove all entries."
msgid "Adblock"
msgstr ""
-msgid "Adblock Domain Query"
-msgstr ""
-
msgid "Adblock Logfile"
msgstr ""
msgid "Loading"
msgstr ""
-msgid "Manual mode"
+msgid "Manual / Backup mode"
msgstr ""
msgid "No"
msgid "SSL req."
msgstr ""
+msgid "Save"
+msgstr ""
+
msgid ""
"Space separated list of interfaces that trigger adblock processing. To "
"disable event driven (re-)starts remove all entries."
msgid "Adblock"
msgstr "Adblock"
-msgid "Adblock Domain Query"
-msgstr ""
-
msgid "Adblock Logfile"
msgstr "Adblock 日志文件"
msgid "Loading"
msgstr "加载中"
-msgid "Manual mode"
+msgid "Manual / Backup mode"
msgstr ""
msgid "No"
msgid "SSL req."
msgstr ""
+msgid "Save"
+msgstr ""
+
msgid ""
"Space separated list of interfaces that trigger adblock processing. To "
"disable event driven (re-)starts remove all entries."
request_dict = {}
request_dict.version = latest_version;
request_dict.board = data.board_name
- server_request(request_dict, "/image-request", image_request_handler)
+ server_request(request_dict, "image-request", image_request_handler)
}
function image_request_handler(response) {
s:tab("advanced", translate("Advanced Settings"))
s:taboption("general", Flag, "disabled", translate("Disable"))
ss.option_install_package(s, "general")
+ss.options_common(s, "advanced")
if stype == "ss_server" then
ss.options_server(s, "general")
translate("Tunnel address"),
translate("The address ss-tunnel will forward traffic to"))
o.datatype = "hostport"
+ elseif stype == "ss_redir" then
+ o = s:taboption("advanced", Flag, "disable_sni",
+ translate("Disable SNI"),
+ translate("Disable parsing HTTP/HTTPS payload to find then resolve hostname at remote server"))
end
end
-ss.options_common(s, "advanced")
return m
cfgvalue_overview_(sdata, lines, names_options_client)
if stype == "ss_tunnel" then
cfgvalue_overview_(sdata, lines, {"tunnel_address"})
+ elseif stype == "ss_redir" then
+ cfgvalue_overview_(sdata, lines, {"disable_sni"})
end
cfgvalue_overview_(sdata, lines, names_options_common)
else
m = SimpleForm("input", nil)
m:append(Template("travelmate/config_css"))
+m.submit = translate("Save")
m.reset = false
s = m:section(SimpleSection, nil,
m = SimpleForm("input", nil)
m:append(Template("travelmate/config_css"))
+m.submit = translate("Save")
m.reset = false
s = m:section(SimpleSection, nil,
m = SimpleForm("input", nil)
m:append(Template("travelmate/config_css"))
+m.submit = translate("Save")
m.reset = false
s = m:section(SimpleSection, nil,
m = SimpleForm("input", nil)
m:append(Template("travelmate/config_css"))
+m.submit = translate("Save")
m.reset = false
s = m:section(SimpleSection, nil,
o.default = "trm_wwan"
o.rmempty = false
- function o.write(self, section, value)
- iface = o:formvalue(section)
- uci:set("travelmate", section, "trm_iface", iface)
- uci:save("travelmate")
- uci:commit("travelmate")
- end
-
btn = s:option(Button, "", translate("Create Uplink Interface"),
translate("Create a new wireless wan uplink interface, configure it to use dhcp and ")
.. translate("add it to the wan zone of the firewall. This step has only to be done once."))
btn.inputtitle = translate("Add Interface")
btn.inputstyle = "apply"
btn.disabled = false
- function btn.write()
+ function btn.write(self, section, value)
+ iface = o:formvalue(section)
+ uci:set("travelmate", section, "trm_iface", iface)
+ uci:save("travelmate")
+ uci:commit("travelmate")
local net = nw:add_network(iface, { proto = "dhcp" })
if net then
nw:save("network")
local trmiface = uci.get("travelmate", "global", "trm_iface") or "trm_wwan"
m = SimpleForm("add", translate("Add Wireless Uplink Configuration"))
+m.submit = translate("Save")
m.cancel = translate("Back to overview")
m.reset = false
local http = require("luci.http")
m = SimpleForm("edit", translate("Edit Wireless Uplink Configuration"))
+m.submit = translate("Save")
m.cancel = translate("Back to overview")
m.reset = false
</table>
</fieldset>
<div class="cbi-page-actions right">
- <form class="inline" action="<%=url('admin/services/travelmate/stations')%>" method="post">
- <input class="cbi-button cbi-button-reset" type="submit" value="<%:Back to overview%>"/>
- </form>
<form class="inline" action="<%=url('admin/services/travelmate/wifiscan')%>" method="post">
<input type="hidden" name="token" value="<%=token%>"/>
<input type="hidden" name="device" value="<%=utl.pcdata(dev)%>"/>
<input class="cbi-button cbi-input-find" type="submit" value="<%:Repeat scan%>"/>
</form>
+ <form class="inline" action="<%=url('admin/services/travelmate/stations')%>" method="post">
+ <input class="cbi-button cbi-button-reset" type="submit" value="<%:Back to overview%>"/>
+ </form>
</div>
</div>