s = m.section(form.NamedSection, "config", pkg.Name);
- o = s.option(
- form.ListValue,
- "dnsmasq_config_update_option",
- _("Update DNSMASQ Config on Start/Stop"),
- _(
- "If update option is selected, the %s'DNS Forwards' section of DHCP and DNS%s will be automatically updated to use selected DoH providers (%smore information%s)."
- ).format(
- '<a href="' + L.url("admin", "network", "dhcp") + '">',
- "</a>",
- '<a href="' + pkg.URL + "#default-settings" + '" target="_blank">',
- "</a>"
- )
- );
- o.value("*", _("Update all configs"));
- o.value("+", _("Update select configs"));
- o.value("-", _("Do not update configs"));
- o.default = "*";
- o.retain = true;
- o.cfgvalue = function (section_id) {
- let val = this.map.data.get(
- this.map.config,
- section_id,
- "dnsmasq_config_update"
+ var dhcp_dnsmasq_values = Object.values(L.uci.sections("dhcp", "dnsmasq"));
+ function isEmpty(obj) {
+ return Object.keys(obj).length === 0;
+ }
+
+ if (!isEmpty(dhcp_dnsmasq_values)) {
+ o = s.option(
+ form.ListValue,
+ "dnsmasq_config_update_option",
+ _("Update DNSMASQ Config on Start/Stop"),
+ _(
+ "If update option is selected, the %s'DNS Forwards' section of DHCP and DNS%s will be automatically updated to use selected DoH providers (%smore information%s)."
+ ).format(
+ '<a href="' + L.url("admin", "network", "dhcp") + '">',
+ "</a>",
+ '<a href="' + pkg.URL + "#default-settings" + '" target="_blank">',
+ "</a>"
+ )
);
- if (val && val[0]) {
- switch (val[0]) {
- case "*":
- case "-":
- return val[0];
- default:
- return "+";
- }
- } else return "*";
- };
- o.write = function (section_id, formvalue) {
- L.uci.set(pkg.Name, section_id, "dnsmasq_config_update", formvalue);
- };
+ o.value("*", _("Update all configs"));
+ o.value("+", _("Update select configs"));
+ o.value("-", _("Do not update configs"));
+ o.default = "*";
+ o.retain = true;
+ o.cfgvalue = function (section_id) {
+ let val = this.map.data.get(
+ this.map.config,
+ section_id,
+ "dnsmasq_config_update"
+ );
+ if (val && val[0]) {
+ switch (val[0]) {
+ case "*":
+ case "-":
+ return val[0];
+ default:
+ return "+";
+ }
+ } else return "*";
+ };
+ o.write = function (section_id, formvalue) {
+ L.uci.set(pkg.Name, section_id, "dnsmasq_config_update", formvalue);
+ };
- o = s.option(
- form.MultiValue,
- "dnsmasq_config_update",
- _("Select the DNSMASQ Configs to update")
- );
- Object.values(L.uci.sections("dhcp", "dnsmasq")).forEach(function (
- element
- ) {
- var description;
- var key;
- if (element[".name"] === L.uci.resolveSID("dhcp", element[".name"])) {
- key = element[".index"];
- description = "dnsmasq[" + element[".index"] + "]";
- } else {
- key = element[".name"];
- description = element[".name"];
- }
- o.value(key, description);
- });
- o.depends("dnsmasq_config_update_option", "+");
- o.retain = true;
+ o = s.option(
+ form.MultiValue,
+ "dnsmasq_config_update",
+ _("Select the DNSMASQ Configs to update")
+ );
+
+ dhcp_dnsmasq_values.forEach(function (element) {
+ var description;
+ var key;
+ if (element[".name"] === L.uci.resolveSID("dhcp", element[".name"])) {
+ key = element[".index"];
+ description = "dnsmasq[" + element[".index"] + "]";
+ } else {
+ key = element[".name"];
+ description = element[".name"];
+ }
+ o.value(key, description);
+ });
+ o.depends("dnsmasq_config_update_option", "+");
+ o.retain = true;
+ }
o = s.option(
form.ListValue,
msgid "BlahDNS"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:148
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:154
msgid ""
"Blocks access to Mozilla Encrypted resolvers, forcing local devices to use "
"router for DNS resolution (%smore information%s)."
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:132
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:138
msgid ""
"Blocks access to iCloud Private Relay resolvers, forcing local devices to "
"use router for DNS resolution (%smore information%s)."
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:328
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:334
msgid "Bootstrap DNS"
msgstr ""
msgid "CIRA Canadian Shield"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:146
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:152
msgid "Canary Domains Mozilla"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:130
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:136
msgid "Canary Domains iCloud"
msgstr ""
msgid "DNSlify DNS"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:355
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:361
msgid "DSCP Codepoint"
msgstr ""
msgid "Disabling %s service"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:67
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:73
msgid "Do not update configs"
msgstr ""
msgid "Force DNS ports:"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:115
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:121
msgid "Force Router DNS"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:124
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:139
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:158
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:130
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:145
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:164
msgid "Force Router DNS server to all local devices"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:388
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:394
msgid "Force use of HTTP/1"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:400
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:406
msgid "Force use of IPv6 DNS resolvers"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:117
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:123
msgid ""
"Forces Router DNS use on local devices, also known as DNS Hijacking. Only "
"works on `lan` interface by default (%smore information%s)."
msgid "HTTPS DNS Proxy - Configuration"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:185
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:191
msgid "HTTPS DNS Proxy - Instances"
msgstr ""
msgid "IIJ Public DNS (JP)"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:57
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:63
msgid ""
"If update option is selected, the %s'DNS Forwards' section of DHCP and DNS%s "
"will be automatically updated to use selected DoH providers (%smore "
msgid "Lelux DNS (FI)"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:157
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:163
msgid "Let local devices use Mozilla Private Relay"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:138
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:144
msgid "Let local devices use iCloud Private Relay"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:123
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:129
msgid "Let local devices use their own DNS servers if set"
msgstr ""
msgid "LibreDNS (GR)"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:333
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:339
#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/status/include/71_https-dns-proxy.js:56
msgid "Listen Address"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:339
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:345
#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/status/include/71_https-dns-proxy.js:57
msgid "Listen Port"
msgstr ""
msgid "Location"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:367
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:373
msgid "Logging File Path"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:361
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:367
msgid "Logging Verbosity"
msgstr ""
msgid "OpenDNS"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:261
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:293
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:267
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:299
msgid "Parameter"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:166
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:175
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:172
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:181
msgid ""
"Please note that %s is not supported on this system (%smore information%s)."
msgstr ""
msgid "Poland"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:372
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:378
msgid "Polling Interval"
msgstr ""
msgid "Protected Filter"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:227
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:233
msgid "Provider"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:378
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:384
msgid "Proxy Server"
msgstr ""
msgid "RubyFish (CN)"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:350
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:356
msgid "Run As Group"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:345
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:351
msgid "Run As User"
msgstr ""
msgid "See the %sREADME%s for details."
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:93
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:99
msgid "Select the DNSMASQ Configs to update"
msgstr ""
msgid "Unfiltered"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:223
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:229
msgid "Unknown"
msgstr ""
msgid "Unsecured"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:55
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:61
msgid "Update DNSMASQ Config on Start/Stop"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:65
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:71
msgid "Update all configs"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:66
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:72
msgid "Update select configs"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:383
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:389
msgid "Use HTTP/1"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:394
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:400
msgid "Use IPv6 resolvers"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:399
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:405
msgid "Use any family DNS resolvers"
msgstr ""
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:387
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:393
msgid "Use negotiated HTTP version"
msgstr ""