luci-app-adblock-fast: update to 1.1.1-1

* Final (hopefully) attempt to avoid errors if dhcp/smartdns configs are
  missing
* New user experience for picking dnsmasq/smartdns instances to enable the
  adblocking on
* use function from init script to set up output paths
* update paths to run-time files in ACL

Signed-off-by: Stan Grishin <stangri@melmac.ca>
This commit is contained in:
Stan Grishin 2023-12-15 02:47:28 +00:00
parent d06b0c9e25
commit 8d8ca1c6aa
5 changed files with 233 additions and 255 deletions

View file

@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca> PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
PKG_VERSION:=1.1.0-7 PKG_VERSION:=1.1.1-1
LUCI_TITLE:=AdBlock-Fast Web UI LUCI_TITLE:=AdBlock-Fast Web UI
LUCI_DESCRIPTION:=Provides Web UI for adblock-fast service. LUCI_DESCRIPTION:=Provides Web UI for adblock-fast service.

View file

@ -18,6 +18,9 @@ var pkg = {
humanFileSize: function (bytes, si = false, dp = 2) { humanFileSize: function (bytes, si = false, dp = 2) {
return `%${si ? 1000 : 1024}.${dp ?? 0}mB`.format(bytes); return `%${si ? 1000 : 1024}.${dp ?? 0}mB`.format(bytes);
}, },
isObjEmpty: function (obj) {
return Object.keys(obj).length === 0;
},
}; };
return view.extend({ return view.extend({
@ -46,6 +49,9 @@ return view.extend({
unbound_installed: false, unbound_installed: false,
leds: [], leds: [],
}, },
pkg: (!pkg.isObjEmpty(data[2]) && data[2]) || null,
dhcp: (!pkg.isObjEmpty(data[3]) && data[3]) || null,
smartdns: (!pkg.isObjEmpty(data[4]) && data[4]) || null,
}; };
var status, m, s1, s2, s3, o; var status, m, s1, s2, s3, o;
@ -176,6 +182,7 @@ return view.extend({
); );
o.depends("dns", "dnsmasq.conf"); o.depends("dns", "dnsmasq.conf");
if (reply.platform.dnsmasq_installed && reply.dhcp) {
o = s1.taboption( o = s1.taboption(
"tab_basic", "tab_basic",
form.ListValue, form.ListValue,
@ -235,7 +242,9 @@ return view.extend({
}); });
o.depends("dnsmasq_instance_option", "+"); o.depends("dnsmasq_instance_option", "+");
o.retain = true; o.retain = true;
}
if (reply.platform.smartdns_installed && reply.smartdns) {
o = s1.taboption( o = s1.taboption(
"tab_basic", "tab_basic",
form.ListValue, form.ListValue,
@ -285,7 +294,9 @@ return view.extend({
) { ) {
var description; var description;
var key; var key;
if (element[".name"] === L.uci.resolveSID("smartdns", element[".name"])) { if (
element[".name"] === L.uci.resolveSID("smartdns", element[".name"])
) {
key = element[".index"]; key = element[".index"];
description = "smartdns[" + element[".index"] + "]"; description = "smartdns[" + element[".index"] + "]";
} else { } else {
@ -296,7 +307,7 @@ return view.extend({
}); });
o.depends("smartdns_instance_option", "+"); o.depends("smartdns_instance_option", "+");
o.retain = true; o.retain = true;
}
o = s1.taboption( o = s1.taboption(
"tab_basic", "tab_basic",
form.ListValue, form.ListValue,

View file

@ -1,8 +1,8 @@
msgid "" msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8" msgstr "Content-Type: text/plain; charset=UTF-8"
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:234 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:241
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:295 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:306
msgid "%s" msgid "%s"
msgstr "" msgstr ""
@ -23,7 +23,7 @@ msgstr ""
msgid "-" msgid "-"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:505 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:516
msgid "Action" msgid "Action"
msgstr "" msgstr ""
@ -36,13 +36,13 @@ msgstr ""
msgid "AdBlock Fast" msgid "AdBlock Fast"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:191 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:198
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:251 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:260
msgid "AdBlock on all instances" msgid "AdBlock on all instances"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:192 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:199
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:252 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:261
msgid "AdBlock on select instances" msgid "AdBlock on select instances"
msgstr "" msgstr ""
@ -50,15 +50,15 @@ msgstr ""
msgid "AdBlock-Fast" msgid "AdBlock-Fast"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:456 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:467
msgid "AdBlock-Fast - Allowed and Blocked Domains" msgid "AdBlock-Fast - Allowed and Blocked Domains"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:480 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:491
msgid "AdBlock-Fast - Allowed and Blocked Lists URLs" msgid "AdBlock-Fast - Allowed and Blocked Lists URLs"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:53 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:59
msgid "AdBlock-Fast - Configuration" msgid "AdBlock-Fast - Configuration"
msgstr "" msgstr ""
@ -66,46 +66,46 @@ msgstr ""
msgid "AdBlock-Fast - Status" msgid "AdBlock-Fast - Status"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:358 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:369
msgid "Add IPv6 entries" msgid "Add IPv6 entries"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:355 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:366
msgid "Add IPv6 entries to block-list." msgid "Add IPv6 entries to block-list."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:56 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:62
msgid "Advanced Configuration" msgid "Advanced Configuration"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:506 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:517
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:511 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:522
msgid "Allow" msgid "Allow"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:464 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:475
msgid "Allowed Domains" msgid "Allowed Domains"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:419 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:430
msgid "" msgid ""
"Attempt to create a compressed cache of block-list in the persistent memory." "Attempt to create a compressed cache of block-list in the persistent memory."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:343 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:354
msgid "Automatic Config Update" msgid "Automatic Config Update"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:55 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:61
msgid "Basic Configuration" msgid "Basic Configuration"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:507 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:518
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:511 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:522
msgid "Block" msgid "Block"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:472 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:483
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:87 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:87
msgid "Blocked Domains" msgid "Blocked Domains"
msgstr "" msgstr ""
@ -146,42 +146,42 @@ msgstr ""
msgid "Config (%s) validation failure!" msgid "Config (%s) validation failure!"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:316 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:327
msgid "Controls system log and console output verbosity." msgid "Controls system log and console output verbosity."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:392 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:403
msgid "Curl download retry" msgid "Curl download retry"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:379 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:390
msgid "Curl maximum file size (in bytes)" msgid "Curl maximum file size (in bytes)"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:137 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:143
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:86 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:86
msgid "DNS Service" msgid "DNS Service"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:59 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:65
msgid "DNS resolution option, see the %sREADME%s for details." msgid "DNS resolution option, see the %sREADME%s for details."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:430 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:441
msgid "Directory for compressed cache file" msgid "Directory for compressed cache file"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:432 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:443
msgid "" msgid ""
"Directory for compressed cache file of block-list in the persistent memory." "Directory for compressed cache file of block-list in the persistent memory."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:424 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:424
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:346 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:357
msgid "Disable" msgid "Disable"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:448 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:459
msgid "Disable Debugging" msgid "Disable Debugging"
msgstr "" msgstr ""
@ -193,23 +193,23 @@ msgstr ""
msgid "Disabling %s service" msgid "Disabling %s service"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:169 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:175
msgid "Dnsmasq Config File URL" msgid "Dnsmasq Config File URL"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:357 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:368
msgid "Do not add IPv6 entries" msgid "Do not add IPv6 entries"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:422 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:433
msgid "Do not store compressed cache" msgid "Do not store compressed cache"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:409 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:420
msgid "Do not use simultaneous processing" msgid "Do not use simultaneous processing"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:369 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:380
msgid "Download time-out (in seconds)" msgid "Download time-out (in seconds)"
msgstr "" msgstr ""
@ -219,17 +219,17 @@ msgid "Downloading lists"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:405 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:405
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:347 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:358
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:501 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:512
msgid "Enable" msgid "Enable"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:445 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:456
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:449 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:460
msgid "Enable Debugging" msgid "Enable Debugging"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:446 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:457
msgid "Enables debug output to /tmp/adblock-fast.log." msgid "Enables debug output to /tmp/adblock-fast.log."
msgstr "" msgstr ""
@ -354,11 +354,11 @@ msgstr ""
msgid "Force Reloading" msgid "Force Reloading"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:304 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:315
msgid "Force Router DNS" msgid "Force Router DNS"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:308 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:319
msgid "Force Router DNS server to all local devices" msgid "Force Router DNS server to all local devices"
msgstr "" msgstr ""
@ -366,7 +366,7 @@ msgstr ""
msgid "Force redownloading %s block lists" msgid "Force redownloading %s block lists"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:305 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:316
msgid "Forces Router DNS use on local devices, also known as DNS Hijacking." msgid "Forces Router DNS use on local devices, also known as DNS Hijacking."
msgstr "" msgstr ""
@ -378,27 +378,27 @@ msgstr ""
msgid "Grant UCI and file access for luci-app-adblock-fast" msgid "Grant UCI and file access for luci-app-adblock-fast"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:354 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:365
msgid "IPv6 Support" msgid "IPv6 Support"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:381 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:392
msgid "" msgid ""
"If curl is installed and detected, it would not download files bigger than " "If curl is installed and detected, it would not download files bigger than "
"this." "this."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:394 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:405
msgid "" msgid ""
"If curl is installed and detected, it would retry download this many times " "If curl is installed and detected, it would retry download this many times "
"on timeout/fail." "on timeout/fail."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:465 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:476
msgid "Individual domains to be allowed." msgid "Individual domains to be allowed."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:473 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:484
msgid "Individual domains to be blocked." msgid "Individual domains to be blocked."
msgstr "" msgstr ""
@ -406,25 +406,25 @@ msgstr ""
msgid "Invalid compressed cache directory '%s'" msgid "Invalid compressed cache directory '%s'"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:328 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:339
msgid "LED to indicate status" msgid "LED to indicate status"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:406 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:417
msgid "" msgid ""
"Launch all lists downloads and processing simultaneously, reducing service " "Launch all lists downloads and processing simultaneously, reducing service "
"start time." "start time."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:307 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:318
msgid "Let local devices use their own DNS servers if set" msgid "Let local devices use their own DNS servers if set"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:253 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:262
msgid "No AdBlock on SmartDNS" msgid "No AdBlock on SmartDNS"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:193 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:200
msgid "No AdBlock on dnsmasq" msgid "No AdBlock on dnsmasq"
msgstr "" msgstr ""
@ -440,7 +440,7 @@ msgstr ""
msgid "Not installed or not found" msgid "Not installed or not found"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:315 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:326
msgid "Output Verbosity Setting" msgid "Output Verbosity Setting"
msgstr "" msgstr ""
@ -452,32 +452,32 @@ msgstr ""
msgid "Pausing %s" msgid "Pausing %s"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:344 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:355
msgid "Perform config update before downloading the block/allow-lists." msgid "Perform config update before downloading the block/allow-lists."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:330 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:341
msgid "Pick the LED not already used in %sSystem LED Configuration%s." msgid "Pick the LED not already used in %sSystem LED Configuration%s."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:281 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:290
msgid "Pick the SmartDNS instance(s) for AdBlocking" msgid "Pick the SmartDNS instance(s) for AdBlocking"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:220 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:227
msgid "Pick the dnsmasq instance(s) for AdBlocking" msgid "Pick the dnsmasq instance(s) for AdBlocking"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:67 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:73
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:72 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:78
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:77 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:83
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:82 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:88
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:89 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:95
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:96 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:102
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:105 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:111
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:112 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:118
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:119 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:125
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:128 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:134
msgid "Please note that %s is not supported on this system." msgid "Please note that %s is not supported on this system."
msgstr "" msgstr ""
@ -511,19 +511,19 @@ msgstr ""
msgid "Service Warnings" msgid "Service Warnings"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:404 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:415
msgid "Simultaneous processing" msgid "Simultaneous processing"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:488 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:499
msgid "Size" msgid "Size"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:498 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:509
msgid "Size: %s" msgid "Size: %s"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:319 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:330
msgid "Some output" msgid "Some output"
msgstr "" msgstr ""
@ -552,7 +552,7 @@ msgstr ""
msgid "Stop" msgid "Stop"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:370 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:381
msgid "Stop the download if it is stalled for set number of seconds." msgid "Stop the download if it is stalled for set number of seconds."
msgstr "" msgstr ""
@ -565,15 +565,15 @@ msgstr ""
msgid "Stopping %s service" msgid "Stopping %s service"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:423 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:434
msgid "Store compressed cache" msgid "Store compressed cache"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:417 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:428
msgid "Store compressed cache file on router" msgid "Store compressed cache file on router"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:318 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:329
msgid "Suppress output" msgid "Suppress output"
msgstr "" msgstr ""
@ -603,29 +603,29 @@ msgstr ""
msgid "The dnsmasq nft sets support is enabled, but nft is not installed" msgid "The dnsmasq nft sets support is enabled, but nft is not installed"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:514 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:525
msgid "URL" msgid "URL"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:171 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:177
msgid "" msgid ""
"URL to the external dnsmasq config file, see the %sREADME%s for details." "URL to the external dnsmasq config file, see the %sREADME%s for details."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:481 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:492
msgid "URLs to file(s) containing lists to be allowed or blocked." msgid "URLs to file(s) containing lists to be allowed or blocked."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:492 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:503
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:95 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:95
msgid "Unknown" msgid "Unknown"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:243 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:252
msgid "Use AdBlocking on the SmartDNS instance(s)" msgid "Use AdBlocking on the SmartDNS instance(s)"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:183 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:190
msgid "Use AdBlocking on the dnsmasq instance(s)" msgid "Use AdBlocking on the dnsmasq instance(s)"
msgstr "" msgstr ""
@ -634,11 +634,11 @@ msgid ""
"Use of external dnsmasq config file detected, please set '%s' option to '%s'" "Use of external dnsmasq config file detected, please set '%s' option to '%s'"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:410 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:421
msgid "Use simultaneous processing" msgid "Use simultaneous processing"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:320 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:331
msgid "Verbose output" msgid "Verbose output"
msgstr "" msgstr ""
@ -654,54 +654,54 @@ msgstr ""
msgid "Warning" msgid "Warning"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:245 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:254
msgid "" msgid ""
"You can limit the AdBlocking to the specific SmartDNS instance(s) (%smore " "You can limit the AdBlocking to the specific SmartDNS instance(s) (%smore "
"information%s)." "information%s)."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:185 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:192
msgid "" msgid ""
"You can limit the AdBlocking to the specific dnsmasq instance(s) (%smore " "You can limit the AdBlocking to the specific dnsmasq instance(s) (%smore "
"information%s)." "information%s)."
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:141 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:147
msgid "dnsmasq additional hosts" msgid "dnsmasq additional hosts"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:142 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:148
msgid "dnsmasq config" msgid "dnsmasq config"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:144 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:150
msgid "dnsmasq ipset" msgid "dnsmasq ipset"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:147 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:153
msgid "dnsmasq nft set" msgid "dnsmasq nft set"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:149 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:155
msgid "dnsmasq servers file" msgid "dnsmasq servers file"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:333 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:344
msgid "none" msgid "none"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:152 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:158
msgid "smartdns domain set" msgid "smartdns domain set"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:154 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:160
msgid "smartdns ipset" msgid "smartdns ipset"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:157 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:163
msgid "smartdns nft set" msgid "smartdns nft set"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:161 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:167
msgid "unbound adblock list" msgid "unbound adblock list"
msgstr "" msgstr ""

View file

@ -95,7 +95,7 @@ get_init_status() {
local name local name
name="$(basename "$1")" name="$(basename "$1")"
name="${name:-$packageName}" name="${name:-$packageName}"
local errors warnings ports dns outputFile outputCache outputGzip local errors warnings ports dns outputFile outputCache outputGzip outputConfig
local i j local i j
# shellcheck disable=SC2034 # shellcheck disable=SC2034
local compressed_cache_dir local compressed_cache_dir
@ -106,46 +106,11 @@ get_init_status() {
if [ -n "$(uci_get "$packageName" 'config' 'dnsmasq_config_file_url')" ]; then if [ -n "$(uci_get "$packageName" 'config' 'dnsmasq_config_file_url')" ]; then
dns="dnsmasq.conf" dns="dnsmasq.conf"
else else
dns="$(uci_get "$packageName" 'config' 'dns')" dns="$(uci_get "$packageName" 'config' 'dns' 'dnsmasq.servers')"
fi fi
case "$dns" in
dnsmasq.addnhosts) dns_set_output_values "$dns"
outputFile="$dnsmasqAddnhostsFile"
outputCache="$dnsmasqAddnhostsCache"
outputGzip="${compressed_cache_dir}/${dnsmasqAddnhostsGzip}"
;;
dnsmasq.conf)
outputFile="$dnsmasqConfFile"
outputCache="$dnsmasqConfCache"
outputGzip="${compressed_cache_dir}/${dnsmasqConfGzip}"
;;
dnsmasq.ipset)
outputFile="$dnsmasqIpsetFile"
outputCache="$dnsmasqIpsetCache"
outputGzip="${compressed_cache_dir}/${dnsmasqIpsetGzip}"
;;
dnsmasq.nftset)
outputFile="$dnsmasqNftsetFile"
outputCache="$dnsmasqNftsetCache"
outputGzip="${compressed_cache_dir}/${dnsmasqNftsetGzip}"
;;
dnsmasq.servers)
outputFile="$dnsmasqServersFile"
outputCache="$dnsmasqServersCache"
outputGzip="${compressed_cache_dir}/${dnsmasqServersGzip}"
;;
smartdns.domainset)
outputFilter="$smartdnsDomainSetFilter"
outputFile="$smartdnsDomainSetFile"
outputCache="$smartdnsDomainSetCache"
outputGzip="${compressed_cache_dir}/${smartdnsDomainSetGzip}"
;;
unbound.adb_list)
outputFile="$unboundFile"
outputCache="$unboundCache"
outputGzip="${compressed_cache_dir}/${unboundGzip}"
;;
esac
json_init json_init
json_add_object "$name" json_add_object "$name"
json_add_boolean 'enabled' "$(is_enabled "$name")" json_add_boolean 'enabled' "$(is_enabled "$name")"

View file

@ -3,7 +3,9 @@
"description": "Grant UCI and file access for luci-app-adblock-fast", "description": "Grant UCI and file access for luci-app-adblock-fast",
"read": { "read": {
"file": { "file": {
"/dev/shm/adblock-fast-status.json": [ "list", "read" ] "/dev/shm/adblock-fast.config": [ "list", "read" ],
"/dev/shm/adblock-fast.error": [ "list", "read" ],
"/dev/shm/adblock-fast.status": [ "list", "read" ]
}, },
"ubus": { "ubus": {
"luci.adblock-fast": [ "luci.adblock-fast": [