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

Signed-off-by: Stan Grishin <stangri@melmac.ca>
This commit is contained in:
Stan Grishin 2023-12-05 08:26:34 +00:00
parent b3d1d056f4
commit 8db9af146a
5 changed files with 171 additions and 107 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.0.1-2 PKG_VERSION:=1.1.0-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

@ -5,7 +5,6 @@
"use strict"; "use strict";
"require form"; "require form";
"require uci";
"require view"; "require view";
"require adblock-fast.status as adb"; "require adblock-fast.status as adb";
@ -26,8 +25,9 @@ return view.extend({
return Promise.all([ return Promise.all([
L.resolveDefault(adb.getFileUrlFilesizes(pkg.Name), {}), L.resolveDefault(adb.getFileUrlFilesizes(pkg.Name), {}),
L.resolveDefault(adb.getPlatformSupport(pkg.Name), {}), L.resolveDefault(adb.getPlatformSupport(pkg.Name), {}),
uci.load(pkg.Name), L.uci.load(pkg.Name),
uci.load("dhcp"), L.uci.load("dhcp"),
L.uci.load("smartdns"),
]); ]);
}, },
@ -95,6 +95,14 @@ return view.extend({
); );
} }
} }
if (!reply.platform.smartdns_installed) {
text =
text +
"<br />" +
_("Please note that %s is not supported on this system.").format(
"<i>smartdns.domainset</i>"
);
}
if (!reply.platform.unbound_installed) { if (!reply.platform.unbound_installed) {
text = text =
text + text +
@ -122,6 +130,9 @@ return view.extend({
} }
o.value("dnsmasq.servers", _("dnsmasq servers file")); o.value("dnsmasq.servers", _("dnsmasq servers file"));
} }
if (reply.platform.smartdns_installed) {
o.value("smartdns.domainset", _("smartdns domain set"));
}
if (reply.platform.unbound_installed) { if (reply.platform.unbound_installed) {
o.value("unbound.adb_list", _("unbound adblock list")); o.value("unbound.adb_list", _("unbound adblock list"));
} }
@ -155,27 +166,12 @@ return view.extend({
); );
o.value("*", _("AdBlock on all instances")); o.value("*", _("AdBlock on all instances"));
// Object.values(L.uci.sections("dhcp", "dnsmasq")).forEach(function ( Object.values(L.uci.sections("dhcp", "dnsmasq")).forEach(function (
// val, element
// index ) {
// ) {
// const nameValueMap = new Map(Object.entries(val));
// so.value(
// nameValueMap.get(".name"),
// "%s (Name: %s, Domain: %s, Local: %s)".format(
// nameValueMap.get(".index"),
// nameValueMap.get(".name") || "noname",
// val.domain || "unset",
// val.local || "unset"
// )
// );
// });
var sections = uci.sections("dhcp", "dnsmasq");
sections.forEach((element) => {
var description; var description;
var key; var key;
if (element[".name"] === uci.resolveSID("dhcp", element[".name"])) { if (element[".name"] === L.uci.resolveSID("dhcp", element[".name"])) {
key = element[".index"]; key = element[".index"];
description = "dnsmasq[" + element[".index"] + "]"; description = "dnsmasq[" + element[".index"] + "]";
} else { } else {
@ -190,6 +186,39 @@ return view.extend({
o.depends("dns", "dnsmasq.servers"); o.depends("dns", "dnsmasq.servers");
o.retain = true; o.retain = true;
o = s1.taboption(
"tab_basic",
form.ListValue,
"smartdns_instance",
_("Use AdBlocking on the SmartDNS instance(s)"),
_(
"You can limit the AdBlocking to a specific SmartDNS instance(s) (%smore information%s)."
).format(
'<a href="' + pkg.URL + "#smartdns_instance" + '" target="_blank">',
"</a>"
)
);
o.value("*", _("AdBlock on all instances"));
Object.values(L.uci.sections("smartdns", "smartdns")).forEach(function (
element
) {
var description;
var key;
if (element[".name"] === L.uci.resolveSID("smartdns", element[".name"])) {
key = element[".index"];
description = "smartdns[" + element[".index"] + "]";
} else {
key = element[".name"];
description = element[".name"];
}
o.value(key, _("AdBlock on %s only").format(description));
});
o.value("-", _("No AdBlock on SmartDNS"));
o.default = "*";
o.depends("dns", "smartdns.domainset");
o.retain = true;
o = s1.taboption( o = s1.taboption(
"tab_basic", "tab_basic",
form.ListValue, form.ListValue,
@ -381,7 +410,7 @@ return view.extend({
o = s3.option(form.DummyValue, "_size", _("Size")); o = s3.option(form.DummyValue, "_size", _("Size"));
o.modalonly = false; o.modalonly = false;
o.cfgvalue = function (section_id) { o.cfgvalue = function (section_id) {
let url = uci.get(pkg.Name, section_id, "url"); let url = L.uci.get(pkg.Name, section_id, "url");
let ret = _("Unknown"); let ret = _("Unknown");
reply.sizes.forEach((element) => { reply.sizes.forEach((element) => {
if (element.url === url) { if (element.url === url) {

View file

@ -18,7 +18,7 @@ msgstr ""
msgid "-" msgid "-"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:398 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:427
msgid "Action" msgid "Action"
msgstr "" msgstr ""
@ -31,11 +31,13 @@ msgstr ""
msgid "AdBlock Fast" msgid "AdBlock Fast"
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:181
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:215
msgid "AdBlock on %s only" msgid "AdBlock on %s only"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:156 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:167
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:201
msgid "AdBlock on all instances" msgid "AdBlock on all instances"
msgstr "" msgstr ""
@ -43,11 +45,11 @@ msgstr ""
msgid "AdBlock-Fast" msgid "AdBlock-Fast"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:349 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:378
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:373 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:402
msgid "AdBlock-Fast - Allowed and Blocked Lists URLs" msgid "AdBlock-Fast - Allowed and Blocked Lists URLs"
msgstr "" msgstr ""
@ -59,11 +61,11 @@ 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:251 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:280
msgid "Add IPv6 entries" msgid "Add IPv6 entries"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:248 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:277
msgid "Add IPv6 entries to block-list." msgid "Add IPv6 entries to block-list."
msgstr "" msgstr ""
@ -71,21 +73,21 @@ msgstr ""
msgid "Advanced Configuration" msgid "Advanced Configuration"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:399 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:428
#: 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:433
msgid "Allow" msgid "Allow"
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:386
msgid "Allowed Domains" msgid "Allowed Domains"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:312 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:341
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:236 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:265
msgid "Automatic Config Update" msgid "Automatic Config Update"
msgstr "" msgstr ""
@ -93,12 +95,12 @@ msgstr ""
msgid "Basic Configuration" msgid "Basic Configuration"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:400 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:429
#: 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:433
msgid "Block" msgid "Block"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:365 #: 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/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 ""
@ -139,19 +141,19 @@ 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:209 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:238
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:285 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:314
msgid "Curl download retry" msgid "Curl download retry"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:272 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:301
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:111 #: 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/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 ""
@ -160,21 +162,21 @@ msgstr ""
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:323 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:352
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:325 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:354
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:239 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:268
msgid "Disable" msgid "Disable"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:341 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:370
msgid "Disable Debugging" msgid "Disable Debugging"
msgstr "" msgstr ""
@ -186,23 +188,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:134 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:145
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:250 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:279
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:315 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:344
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:302 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:331
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:262 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:291
msgid "Download time-out (in seconds)" msgid "Download time-out (in seconds)"
msgstr "" msgstr ""
@ -212,17 +214,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:240 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:269
#: 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:423
msgid "Enable" msgid "Enable"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:338 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:367
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:342 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:371
msgid "Enable Debugging" msgid "Enable Debugging"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:339 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:368
msgid "Enables debug output to /tmp/adblock-fast.log." msgid "Enables debug output to /tmp/adblock-fast.log."
msgstr "" msgstr ""
@ -347,11 +349,11 @@ msgstr ""
msgid "Force Reloading" msgid "Force Reloading"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:197 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:226
msgid "Force Router DNS" msgid "Force Router DNS"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:201 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:230
msgid "Force Router DNS server to all local devices" msgid "Force Router DNS server to all local devices"
msgstr "" msgstr ""
@ -359,7 +361,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:198 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:227
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 ""
@ -371,27 +373,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:247 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:276
msgid "IPv6 Support" msgid "IPv6 Support"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:274 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:303
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:287 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:316
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:358 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:387
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:366 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:395
msgid "Individual domains to be blocked." msgid "Individual domains to be blocked."
msgstr "" msgstr ""
@ -399,21 +401,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:221 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:250
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:299 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:328
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:200 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:229
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:187 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:217
msgid "No AdBlock on SmartDNS"
msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:183
msgid "No AdBlock on dnsmasq" msgid "No AdBlock on dnsmasq"
msgstr "" msgstr ""
@ -429,7 +435,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:208 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:237
msgid "Output Verbosity Setting" msgid "Output Verbosity Setting"
msgstr "" msgstr ""
@ -441,11 +447,11 @@ msgstr ""
msgid "Pausing %s" msgid "Pausing %s"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:237 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:266
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:223 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:252
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 ""
@ -456,6 +462,7 @@ msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:86 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:86
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:93 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:93
#: 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:102
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:110
msgid "Please note that %s is not supported on this system." msgid "Please note that %s is not supported on this system."
msgstr "" msgstr ""
@ -489,19 +496,19 @@ msgstr ""
msgid "Service Warnings" msgid "Service Warnings"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:297 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:326
msgid "Simultaneous processing" msgid "Simultaneous processing"
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:410
msgid "Size" msgid "Size"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:391 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:420
msgid "Size: %s" msgid "Size: %s"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:212 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:241
msgid "Some output" msgid "Some output"
msgstr "" msgstr ""
@ -530,7 +537,7 @@ msgstr ""
msgid "Stop" msgid "Stop"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:263 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:292
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 ""
@ -543,15 +550,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:316 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:345
msgid "Store compressed cache" msgid "Store compressed cache"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:310 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:339
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:211 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:240
msgid "Suppress output" msgid "Suppress output"
msgstr "" msgstr ""
@ -581,25 +588,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:407 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:436
msgid "URL" msgid "URL"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:136 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:147
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:374 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:403
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:385 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:414
#: 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:148 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:193
msgid "Use AdBlocking on the SmartDNS instance(s)"
msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:159
msgid "Use AdBlocking on the dnsmasq instance(s)" msgid "Use AdBlocking on the dnsmasq instance(s)"
msgstr "" msgstr ""
@ -608,11 +619,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:303 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:332
msgid "Use simultaneous processing" msgid "Use simultaneous processing"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:213 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:242
msgid "Verbose output" msgid "Verbose output"
msgstr "" msgstr ""
@ -628,36 +639,46 @@ msgstr ""
msgid "Warning" msgid "Warning"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:150 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:195
msgid ""
"You can limit the AdBlocking to a specific SmartDNS instance(s) (%smore "
"information%s)."
msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:161
msgid "" msgid ""
"You can limit the AdBlocking to a specific dnsmasq instance(s) (%smore " "You can limit the AdBlocking to a 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:115 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:123
msgid "dnsmasq additional hosts" msgid "dnsmasq additional hosts"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:116 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:124
msgid "dnsmasq config" msgid "dnsmasq config"
msgstr "" msgstr ""
#: 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:126
msgid "dnsmasq ipset" msgid "dnsmasq ipset"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:121 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:129
msgid "dnsmasq nft set" msgid "dnsmasq nft set"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:123 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:131
msgid "dnsmasq servers file" msgid "dnsmasq servers file"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:226 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:255
msgid "none" msgid "none"
msgstr "" msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:126 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:134
msgid "smartdns domain set"
msgstr ""
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:137
msgid "unbound adblock list" msgid "unbound adblock list"
msgstr "" msgstr ""

View file

@ -73,13 +73,18 @@ set_init_action() {
fi fi
case $action in case $action in
enable) enable)
cmd="uci -q set ${name}.config.enabled=1 && uci commit $name";; cmd="/etc/init.d/${name} ${action}"
cmd="${cmd} && uci_set ${name} config enabled 1 && uci_commit $name"
;;
disable) disable)
cmd="uci -q set ${name}.config.enabled=0 && uci commit $name";; cmd="/etc/init.d/${name} ${action}"
cmd="${cmd} && uci_set ${name} config enabled 0 && uci_commit $name"
;;
start|stop|reload|restart|dl|pause) start|stop|reload|restart|dl|pause)
cmd="/etc/init.d/${name} ${action}";; cmd="/etc/init.d/${name} ${action}"
;;
esac esac
if [ -n "$cmd" ] && eval "${cmd}" >/dev/null 2>&1; then if [ -n "$cmd" ] && eval "$cmd" >/dev/null 2>&1; then
print_json_bool "result" '1' print_json_bool "result" '1'
else else
print_json_bool "result" '0' print_json_bool "result" '0'
@ -96,15 +101,12 @@ get_init_status() {
local compressed_cache_dir local compressed_cache_dir
config_load "$name" config_load "$name"
config_get compressed_cache_dir 'config' 'compressed_cache_dir' '/etc' config_get compressed_cache_dir 'config' 'compressed_cache_dir' '/etc'
if [ -n "$(sanitize_dir "$compressed_cache_dir")" ]; then compressed_cache_dir="$(sanitize_dir "$compressed_cache_dir")"
compressed_cache_dir="$(sanitize_dir "$compressed_cache_dir")" compressed_cache_dir="${compressed_cache_dir:-/etc}"
else if [ -n "$(uci_get "$packageName" 'config' 'dnsmasq_config_file_url')" ]; then
compressed_cache_dir="/etc"
fi
if [ -n "$(uci -q get $packageName.config.dnsmasq_config_file_url)" ]; then
dns="dnsmasq.conf" dns="dnsmasq.conf"
else else
dns="$(uci -q get $packageName.config.dns)" dns="$(uci_get "$packageName" 'config' 'dns')"
fi fi
case "$dns" in case "$dns" in
dnsmasq.addnhosts) dnsmasq.addnhosts)
@ -132,6 +134,12 @@ get_init_status() {
outputCache="$dnsmasqServersCache" outputCache="$dnsmasqServersCache"
outputGzip="${compressed_cache_dir}/${dnsmasqServersGzip}" outputGzip="${compressed_cache_dir}/${dnsmasqServersGzip}"
;; ;;
smartdns.domainset)
outputFilter="$smartdnsDomainSetFilter"
outputFile="$smartdnsDomainSetFile"
outputCache="$smartdnsDomainSetCache"
outputGzip="${compressed_cache_dir}/${smartdnsDomainSetGzip}"
;;
unbound.adb_list) unbound.adb_list)
outputFile="$unboundFile" outputFile="$unboundFile"
outputCache="$unboundCache" outputCache="$unboundCache"
@ -243,6 +251,11 @@ get_platform_support() {
else else
json_add_boolean 'dnsmasq_installed' '0' json_add_boolean 'dnsmasq_installed' '0'
fi fi
if check_smartdns; then
json_add_boolean 'smartdns_installed' '1'
else
json_add_boolean 'smartdns_installed' '0'
fi
if check_unbound; then if check_unbound; then
json_add_boolean 'unbound_installed' '1' json_add_boolean 'unbound_installed' '1'
else else

View file

@ -15,7 +15,8 @@
}, },
"uci": [ "uci": [
"adblock-fast", "adblock-fast",
"dhcp" "dhcp",
"smartdns"
] ]
}, },
"write": { "write": {