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

* update license ID and copyright in Makefile
* add a short README with link to full documentation
* switch doc link from melmac.net to melmac.ca
* add donate text/URL
* attempt to fix bootstrap DNS loading/saving from json
* add DNS4EU provider (thanks @rikroe)
* add OpenNameServer provider (thanks @Phoenix616)

Signed-off-by: Stan Grishin <stangri@melmac.ca>
This commit is contained in:
Stan Grishin
2025-08-08 20:38:28 +00:00
parent 7e74171feb
commit 45e3d1ac19
7 changed files with 217 additions and 51 deletions
@@ -329,13 +329,51 @@ return view.extend({
};
_paramText.remove = _paramText.write;
}
const _boot_dns = s.option(
form.Value,
"_bootstrap_dns_" + i,
_("Bootstrap DNS")
);
_boot_dns.template = prov.template;
_boot_dns.modalonly = true;
_boot_dns.depends("_provider", prov.template);
_boot_dns.cfgvalue = function (section_id) {
const c_value = this.map.data.get(
this.map.config,
section_id,
"bootstrap_dns"
);
return c_value || prov.bootstrap_dns || "";
};
_boot_dns.write = function (section_id, formvalue) {
const resolver = this.map.data.get(
this.map.config,
section_id,
"resolver_url"
);
const regexp = pkg.templateToRegexp(_boot_dns.template);
if (regexp.test(resolver)) {
console.log(
pkg.Name,
section_id,
"bootstrap_dns",
formvalue,
this.cfgvalue(section_id)
);
if (formvalue)
L.uci.set(pkg.Name, section_id, "bootstrap_dns", formvalue);
else
L.uci.set(
pkg.Name,
section_id,
"bootstrap_dns",
this.cfgvalue(section_id)
);
}
_boot_dns.remove = _boot_dns.write;
};
});
o = s.option(form.Value, "bootstrap_dns", _("Bootstrap DNS"));
o.default = "";
o.modalonly = true;
o.optional = true;
o = s.option(form.Value, "listen_addr", _("Listen Address"));
o.datatype = "ipaddr('nomask')";
o.default = "";