luci-app-https-dns-proxy: update to 2025.05.11

* fixes https://github.com/openwrt/luci/issues/7763
* fixes https://github.com/stangri/luci-app-https-dns-proxy/issues/9
* fix README link

Signed-off-by: Stan Grishin <stangri@melmac.ca>
This commit is contained in:
Stan Grishin
2025-05-12 02:08:33 +00:00
parent 50bee13aeb
commit bd5cb1dd66
5 changed files with 111 additions and 106 deletions
@@ -49,65 +49,71 @@ return view.extend({
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"
);
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);
};
var dhcp_dnsmasq_values = Object.values(L.uci.sections("dhcp", "dnsmasq"));
function isEmpty(obj) {
return Object.keys(obj).length === 0;
}
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;
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>"
)
);
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")
);
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,