summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-adblock
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-adblock')
-rw-r--r--applications/luci-app-adblock/luasrc/model/cbi/adblock.lua45
-rw-r--r--applications/luci-app-adblock/po/sv/adblock.po114
-rw-r--r--applications/luci-app-adblock/po/templates/adblock.pot112
-rw-r--r--applications/luci-app-adblock/po/zh-cn/adblock.po125
4 files changed, 380 insertions, 16 deletions
diff --git a/applications/luci-app-adblock/luasrc/model/cbi/adblock.lua b/applications/luci-app-adblock/luasrc/model/cbi/adblock.lua
index 260361734..2cee30208 100644
--- a/applications/luci-app-adblock/luasrc/model/cbi/adblock.lua
+++ b/applications/luci-app-adblock/luasrc/model/cbi/adblock.lua
@@ -12,11 +12,6 @@ o1 = s:option(Flag, "adb_enabled", translate("Enable adblock"))
o1.rmempty = false
o1.default = 0
-o2 = s:option(Value, "adb_blacklist", translate("Blacklist file"),
- translate("File with explicitly blacklisted hosts/domains."))
-o2.rmempty = false
-o2.datatype = "file"
-
o3 = s:option(Value, "adb_whitelist", translate("Whitelist file"),
translate("File with whitelisted hosts/domains that are allowed despite being on a blocklist."))
o3.rmempty = false
@@ -28,6 +23,14 @@ fdns = s:option(Flag, "adb_forcedns", translate("Redirect all DNS queries to the
fdns.rmempty = false
fdns.default = fdns.enabled
+-- Statistics
+
+t = m:section(NamedSection, "global", "adblock", translate("Statistics"))
+
+dat = t:option(DummyValue, "adb_lastrun", translate("Last update of the blocklists"))
+tot = t:option(DummyValue, "adb_overall_count", translate("Total count of blocked domains"))
+prc = t:option(DummyValue, "adb_percentage", translate("Percentage of blocked packets (before last update, IPv4/IPv6)"))
+
-- Blocklist options
bl = m:section(TypedSection, "source", translate("Blocklist sources"),
@@ -41,8 +44,9 @@ bl.template = "cbi/tblsection"
name = bl:option(Flag, "enabled", translate("Enabled"))
name.rmempty = false
-des = bl:option(DummyValue, "adb_srcdesc", translate("Description"))
-des.rmempty = false
+des = bl:option(DummyValue, "adb_src_desc", translate("Description"))
+cou = bl:option(DummyValue, "adb_src_count", translate("Count"))
+upd = bl:option(DummyValue, "adb_src_timestamp", translate("List date/state"))
-- Additional options
@@ -52,7 +56,7 @@ o4 = s2:option(Flag, "enabled", translate("Enable blocklist backup"))
o4.rmempty = false
o4.default = 0
-o5 = s2:option(Value, "adb_backupdir", translate("Backup directory"))
+o5 = s2:option(Value, "adb_dir", translate("Backup directory"))
o5.rmempty = false
o5.datatype = "directory"
@@ -61,25 +65,34 @@ o5.datatype = "directory"
e = m:section(NamedSection, "global", "adblock", translate("Extra options"),
translate("Options for further tweaking in case the defaults are not suitable for you."))
-a1 = e:option(Value, "adb_port", translate("Port of the adblock uhttpd instance"))
+a0 = e:option(Flag, "adb_restricted", translate("Do not write status info to flash"),
+ translate("Skip writing update status information to the config file. Status fields on this page will not be updated."))
+a0.default = 0
+
+a1 = e:option(Value, "adb_nullport", translate("Port of the adblock uhttpd instance"))
a1.optional = true
-a1.default = 65535
+a1.default = 65534
a1.datatype = "port"
+a5 = e:option(Value, "adb_nullportssl", translate("Port of the adblock uhttpd instance for https links"))
+a5.optional = true
+a5.default = 65535
+a5.datatype = "port"
+
a2 = e:option(Value, "adb_nullipv4", translate("IPv4 blackhole ip address"))
a2.optional = true
-a2.default = "192.0.2.1"
+a2.default = "198.18.0.1"
a2.datatype = "ip4addr"
a3 = e:option(Value, "adb_nullipv6", translate("IPv6 blackhole ip address"))
a3.optional = true
-a3.default = "::ffff:c000:0201"
+a3.default = "::ffff:c612:0001"
a3.datatype = "ip6addr"
-a6 = e:option(Value, "adb_wanif", translate("Name of the logical wan interface"))
-a6.optional = true
-a6.default = "wan"
-a6.datatype = "network"
+a4 = e:option(Value, "adb_fetchttl", translate("Timeout for blocklist fetch (seconds)"))
+a4.optional = true
+a4.default = 5
+a4.datatype = "range(2,60)"
a7 = e:option(Value, "adb_lanif", translate("Name of the logical lan interface"))
a7.optional = true
diff --git a/applications/luci-app-adblock/po/sv/adblock.po b/applications/luci-app-adblock/po/sv/adblock.po
new file mode 100644
index 000000000..9c0ca21f1
--- /dev/null
+++ b/applications/luci-app-adblock/po/sv/adblock.po
@@ -0,0 +1,114 @@
+msgid ""
+msgstr "Content-Type: text/plain; charset=UTF-8\n"
+
+msgid ""
+"). Note that list URLs and Shallalist category selections are not "
+"configurable via Luci."
+msgstr ""
+
+msgid "Adblock"
+msgstr "Blockering av annonser"
+
+msgid "Available blocklist sources ("
+msgstr "Tillgängliga källor för blockeringslistor ("
+
+msgid "Backup directory"
+msgstr "Säkerhetskopiera mapp"
+
+msgid "Backup options"
+msgstr "Alternativ för säkerhetskopiering"
+
+msgid "Blocklist sources"
+msgstr "Källor för blockeringslistor"
+
+msgid ""
+"Configuration of the adblock package to block ad/abuse domains by using DNS."
+msgstr ""
+"Konfiguration av paket adblock för att blockera annons/otillåtna domäner "
+"genom att användning DNS."
+
+msgid "Count"
+msgstr "Räkna"
+
+msgid "Description"
+msgstr "Beskrivning"
+
+msgid "Do not write status info to flash"
+msgstr "Skriv inte status info till flash"
+
+msgid "Enable adblock"
+msgstr "Aktivera abblock"
+
+msgid "Enable blocklist backup"
+msgstr "Aktivera säkerhetskopiering av blockeringslistan"
+
+msgid "Enabled"
+msgstr "Aktiverad"
+
+msgid "Extra options"
+msgstr "Extra alternativ"
+
+msgid ""
+"File with whitelisted hosts/domains that are allowed despite being on a "
+"blocklist."
+msgstr ""
+
+msgid "Global options"
+msgstr "Globala alternativ"
+
+msgid "IPv4 blackhole ip address"
+msgstr ""
+
+msgid "IPv6 blackhole ip address"
+msgstr ""
+
+msgid "Last update of the blocklists"
+msgstr ""
+
+msgid "List date/state"
+msgstr ""
+
+msgid "Name of the logical lan interface"
+msgstr ""
+
+msgid ""
+"Options for further tweaking in case the defaults are not suitable for you."
+msgstr ""
+
+msgid "Percentage of blocked packets (before last update, IPv4/IPv6)"
+msgstr ""
+
+msgid "Port of the adblock uhttpd instance"
+msgstr ""
+
+msgid "Port of the adblock uhttpd instance for https links"
+msgstr ""
+
+msgid "Redirect all DNS queries to the local resolver"
+msgstr "Dirigera om alla DNS-förfrågning till den lokala resolvern"
+
+msgid ""
+"Skip writing update status information to the config file. Status fields on "
+"this page will not be updated."
+msgstr ""
+
+msgid "Statistics"
+msgstr ""
+
+msgid "Timeout for blocklist fetch (seconds)"
+msgstr ""
+
+msgid "Total count of blocked domains"
+msgstr ""
+
+msgid ""
+"When adblock is active, all DNS queries are redirected to the local resolver "
+"in this server by default. You can disable that to allow queries to external "
+"DNS servers."
+msgstr ""
+
+msgid "Whitelist file"
+msgstr "Vitlista fil"
+
+msgid "see list details"
+msgstr "se listans detaljer"
diff --git a/applications/luci-app-adblock/po/templates/adblock.pot b/applications/luci-app-adblock/po/templates/adblock.pot
new file mode 100644
index 000000000..eeb0d975b
--- /dev/null
+++ b/applications/luci-app-adblock/po/templates/adblock.pot
@@ -0,0 +1,112 @@
+msgid ""
+msgstr "Content-Type: text/plain; charset=UTF-8"
+
+msgid ""
+"). Note that list URLs and Shallalist category selections are not "
+"configurable via Luci."
+msgstr ""
+
+msgid "Adblock"
+msgstr ""
+
+msgid "Available blocklist sources ("
+msgstr ""
+
+msgid "Backup directory"
+msgstr ""
+
+msgid "Backup options"
+msgstr ""
+
+msgid "Blocklist sources"
+msgstr ""
+
+msgid ""
+"Configuration of the adblock package to block ad/abuse domains by using DNS."
+msgstr ""
+
+msgid "Count"
+msgstr ""
+
+msgid "Description"
+msgstr ""
+
+msgid "Do not write status info to flash"
+msgstr ""
+
+msgid "Enable adblock"
+msgstr ""
+
+msgid "Enable blocklist backup"
+msgstr ""
+
+msgid "Enabled"
+msgstr ""
+
+msgid "Extra options"
+msgstr ""
+
+msgid ""
+"File with whitelisted hosts/domains that are allowed despite being on a "
+"blocklist."
+msgstr ""
+
+msgid "Global options"
+msgstr ""
+
+msgid "IPv4 blackhole ip address"
+msgstr ""
+
+msgid "IPv6 blackhole ip address"
+msgstr ""
+
+msgid "Last update of the blocklists"
+msgstr ""
+
+msgid "List date/state"
+msgstr ""
+
+msgid "Name of the logical lan interface"
+msgstr ""
+
+msgid ""
+"Options for further tweaking in case the defaults are not suitable for you."
+msgstr ""
+
+msgid "Percentage of blocked packets (before last update, IPv4/IPv6)"
+msgstr ""
+
+msgid "Port of the adblock uhttpd instance"
+msgstr ""
+
+msgid "Port of the adblock uhttpd instance for https links"
+msgstr ""
+
+msgid "Redirect all DNS queries to the local resolver"
+msgstr ""
+
+msgid ""
+"Skip writing update status information to the config file. Status fields on "
+"this page will not be updated."
+msgstr ""
+
+msgid "Statistics"
+msgstr ""
+
+msgid "Timeout for blocklist fetch (seconds)"
+msgstr ""
+
+msgid "Total count of blocked domains"
+msgstr ""
+
+msgid ""
+"When adblock is active, all DNS queries are redirected to the local resolver "
+"in this server by default. You can disable that to allow queries to external "
+"DNS servers."
+msgstr ""
+
+msgid "Whitelist file"
+msgstr ""
+
+msgid "see list details"
+msgstr ""
diff --git a/applications/luci-app-adblock/po/zh-cn/adblock.po b/applications/luci-app-adblock/po/zh-cn/adblock.po
new file mode 100644
index 000000000..e57921daa
--- /dev/null
+++ b/applications/luci-app-adblock/po/zh-cn/adblock.po
@@ -0,0 +1,125 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"POT-Creation-Date: \n"
+"PO-Revision-Date: \n"
+"Last-Translator: kuoruan@gmail.com\n"
+"Language-Team: none\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.5\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+msgid ""
+"). Note that list URLs and Shallalist category selections are not "
+"configurable via Luci."
+msgstr ")。需要注意的是列表URL和列表类别选项无法通过Luci设置。"
+
+msgid "Adblock"
+msgstr "Adblock"
+
+msgid "Available blocklist sources ("
+msgstr "可用拦截列表来源("
+
+msgid "Backup directory"
+msgstr "备份目录"
+
+msgid "Backup options"
+msgstr "备份选项"
+
+msgid "Blocklist sources"
+msgstr "拦截列表来源"
+
+msgid ""
+"Configuration of the adblock package to block ad/abuse domains by using DNS."
+msgstr "Adblock 配置工具,通过 DNS 来拦截广告和阻止域名。"
+
+msgid "Count"
+msgstr "数量"
+
+msgid "Description"
+msgstr "描述"
+
+msgid "Do not write status info to flash"
+msgstr ""
+
+msgid "Enable adblock"
+msgstr "启用Adblock"
+
+msgid "Enable blocklist backup"
+msgstr "启用拦截规则备份"
+
+msgid "Enabled"
+msgstr "启用"
+
+msgid "Extra options"
+msgstr "额外选项"
+
+msgid ""
+"File with whitelisted hosts/domains that are allowed despite being on a "
+"blocklist."
+msgstr "允许的主机/域名列表"
+
+msgid "Global options"
+msgstr "全局选项"
+
+msgid "IPv4 blackhole ip address"
+msgstr "IPv4禁止列表"
+
+msgid "IPv6 blackhole ip address"
+msgstr "IPv6禁止列表"
+
+msgid "Last update of the blocklists"
+msgstr ""
+
+msgid "List date/state"
+msgstr "列表日期/状态"
+
+msgid "Name of the logical lan interface"
+msgstr "LAN接口名称"
+
+msgid ""
+"Options for further tweaking in case the defaults are not suitable for you."
+msgstr "在默认设置并不适合你时的额外选项。"
+
+msgid "Percentage of blocked packets (before last update, IPv4/IPv6)"
+msgstr ""
+
+msgid "Port of the adblock uhttpd instance"
+msgstr "Adblock uhttpd端口"
+
+msgid "Port of the adblock uhttpd instance for https links"
+msgstr ""
+
+msgid "Redirect all DNS queries to the local resolver"
+msgstr "将所有DNS查询都重定向到本地解析器"
+
+msgid ""
+"Skip writing update status information to the config file. Status fields on "
+"this page will not be updated."
+msgstr ""
+
+msgid "Statistics"
+msgstr ""
+
+msgid "Timeout for blocklist fetch (seconds)"
+msgstr "列表查询超时时间(秒)"
+
+msgid "Total count of blocked domains"
+msgstr "阻止域名总数"
+
+msgid ""
+"When adblock is active, all DNS queries are redirected to the local resolver "
+"in this server by default. You can disable that to allow queries to external "
+"DNS servers."
+msgstr ""
+"当Adblock处于活动状态时,默认情况下会将所有的DNS查询重定向到此服务器的本地解"
+"析器。您可以禁用以允许查询外部DNS服务器。"
+
+msgid "Whitelist file"
+msgstr "白名单文件"
+
+msgid "see list details"
+msgstr "查看列表详情"