luci-app-https-dns-proxy: bugfix: OpenDNS family filter URL update
authorStan Grishin <stangri@melmac.ca>
Mon, 29 Jul 2024 01:07:55 +0000 (01:07 +0000)
committerStan Grishin <stangri@melmac.ca>
Mon, 29 Jul 2024 01:35:14 +0000 (01:35 +0000)
* bugfix: update OpenDNS family filter URL
* update copyright/license
* update PKG_RELEASE to avoid double `r` on snapshots
* add LUCI_URL to upstream repository
* update README URL to upstream documentation
* update pkg.URL property to allow linking to a specific version of README
* remove duplicates of pkg object from overview.js/status include js files

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 9c836d14734f069421a459a63436d07cc91dd760)

applications/luci-app-https-dns-proxy/Makefile
applications/luci-app-https-dns-proxy/README.md [new file with mode: 0644]
applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/https-dns-proxy/status.js
applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js
applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/status/include/71_https-dns-proxy.js
applications/luci-app-https-dns-proxy/po/templates/https-dns-proxy.pot
applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.opendns.doh.json

index f546806849d04556e9cadc847d10000ff1c59c70..9ca88118991b3045ba7b98c555265d5ecf4251c0 100644 (file)
@@ -1,15 +1,16 @@
-# Copyright 2017-2018 Stan Grishin (stangri@melmac.ca)
-# This is free software, licensed under the GNU General Public License v3.
+# Copyright 2017-2024 MOSSDeF, Stan Grishin (stangri@melmac.ca).
+# This is free software, licensed under AGPL-3.0-or-later.
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luci-app-https-dns-proxy
-PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE:=AGPL-3.0-or-later
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
 PKG_VERSION:=2023.11.19
-PKG_RELEASE:=r3
+PKG_RELEASE:=4
 
 LUCI_TITLE:=DNS Over HTTPS Proxy Web UI
+LUCI_URL:=https://github.com/stangri/luci-app-https-dns-proxy/
 LUCI_DESCRIPTION:=Provides Web UI for DNS Over HTTPS Proxy
 LUCI_DEPENDS:=+luci-base +https-dns-proxy
 
diff --git a/applications/luci-app-https-dns-proxy/README.md b/applications/luci-app-https-dns-proxy/README.md
new file mode 100644 (file)
index 0000000..a9e9652
--- /dev/null
@@ -0,0 +1,4 @@
+# README
+
+Documentation for this project is available at [https://docs.openwrt.melmac.net/luci-app-https-dns-proxy/](https://docs.openwrt.melmac.net/luci-app-https-dns-proxy/).
+
index 0ae128b9234e75adca6fd49190352a58de90a52b..37675c5b8320cf09a68b496fb907e6ade9140b97 100644 (file)
@@ -13,8 +13,16 @@ var pkg = {
        get Name() {
                return "https-dns-proxy";
        },
+       get ReadmeCompat() {
+               return "";
+       },
        get URL() {
-               return "https://docs.openwrt.melmac.net/" + pkg.Name + "/";
+               return (
+                       "https://docs.openwrt.melmac.net/" +
+                       pkg.Name +
+                       "/" +
+                       (pkg.ReadmeCompat ? pkg.ReadmeCompat + "/" : "")
+               );
        },
        templateToRegexp: function (template) {
                return RegExp(
@@ -30,6 +38,9 @@ var pkg = {
                                "$"
                );
        },
+       templateToResolver: function (template, args) {
+               return template.replace(/{(\w+)}/g, (_, v) => args[v]);
+       },
 };
 
 var getInitList = rpc.declare({
@@ -428,6 +439,8 @@ RPC.on("setInitAction", function (reply) {
 
 return L.Class.extend({
        status: status,
+       pkg: pkg,
+       getInitStatus: getInitStatus,
        getPlatformSupport: getPlatformSupport,
        getProviders: getProviders,
        getRuntime: getRuntime,
index 86cafd1030934ea62e0be0f489d2ff8e95130407..5922a35279d4c06816f7b9db25c3b1a79502495f 100644 (file)
 "require view";
 "require https-dns-proxy.status as hdp";
 
-var pkg = {
-       get Name() {
-               return "https-dns-proxy";
-       },
-
-       get URL() {
-               return "https://docs.openwrt.melmac.net/" + pkg.Name + "/";
-       },
-
-       templateToRegexp: function (template) {
-               return RegExp(
-                       "^" +
-                               template
-                                       .split(/(\{\w+\})/g)
-                                       .map((part) => {
-                                               let placeholder = part.match(/^\{(\w+)\}$/);
-                                               if (placeholder) return `(?<${placeholder[1]}>.*?)`;
-                                               else return part.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-                                       })
-                                       .join("") +
-                               "$"
-               );
-       },
-
-       templateToResolver: function (template, args) {
-               return template.replace(/{(\w+)}/g, (_, v) => args[v]);
-       },
-};
+var pkg = hdp.pkg;
 
 return view.extend({
        load: function () {
index 8723b6e653a6fc797b67f8c35602df450733bfcf..401e1546d1490c8bc99cdaa9d2f6992ad3e16415 100644 (file)
@@ -3,62 +3,18 @@
 "require uci";
 "require form";
 "require baseclass";
+"require https-dns-proxy.status as hdp";
 
-var pkg = {
-       get Name() {
-               return "https-dns-proxy";
-       },
-       get URL() {
-               return "https://docs.openwrt.melmac.net/" + pkg.Name + "/";
-       },
-       templateToRegexp: function (template) {
-               return RegExp(
-                       "^" +
-                               template
-                                       .split(/(\{\w+\})/g)
-                                       .map((part) => {
-                                               let placeholder = part.match(/^\{(\w+)\}$/);
-                                               if (placeholder) return `(?<${placeholder[1]}>.*?)`;
-                                               else return part.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-                                       })
-                                       .join("") +
-                               "$"
-               );
-       },
-};
-
-var getInitStatus = rpc.declare({
-       object: "luci." + pkg.Name,
-       method: "getInitStatus",
-       params: ["name"],
-});
-
-var getPlatformSupport = rpc.declare({
-       object: "luci." + pkg.Name,
-       method: "getPlatformSupport",
-       params: ["name"],
-});
-
-var getProviders = rpc.declare({
-       object: "luci." + pkg.Name,
-       method: "getProviders",
-       params: ["name"],
-});
-
-var getRuntime = rpc.declare({
-       object: "luci." + pkg.Name,
-       method: "getRuntime",
-       params: ["name"],
-});
+var pkg = hdp.pkg;
 
 return baseclass.extend({
        title: _("HTTPS DNS Proxy Instances"),
 
        load: function () {
                return Promise.all([
-                       getInitStatus(pkg.Name),
-                       getProviders(pkg.Name),
-                       getRuntime(pkg.Name),
+                       hdp.getInitStatus(pkg.Name),
+                       hdp.getProviders(pkg.Name),
+                       hdp.getRuntime(pkg.Name),
                ]);
        },
 
index c21d2cb6ef37f74c88e14443816756035cf1f143..91a8f48e62437152f9b338712258a51cbcecfa94 100644 (file)
@@ -37,6 +37,18 @@ msgstr ""
 msgid "DSCP Codepoint"
 msgstr ""
 
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.decloudus.dns.json:2
+msgid "DeCloudUs DNS"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/ch.digitale-gesellschaft.dns.json:2
+msgid "Digitale Gesellschaft (CH)"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/app.tiarap.doh.json:14
+msgid "Direct"
+msgstr ""
+
 #: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/https-dns-proxy/status.js:376
 msgid "Disable"
 msgstr ""
@@ -57,6 +69,32 @@ msgstr ""
 msgid "Enabling %s service"
 msgstr ""
 
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.ffmuc.doh.json:2
+msgid "FFMUC DNS (DE)"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/ca.cira.canadianshield.json:14
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.adguard.dns.json:14
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.cloudflare-dns.json:14
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.controld.freedns.json:14
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.opendns.doh.json:14
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/org.cleanbrowsing.doh.json:18
+msgid "Family Filter"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/org.cleanbrowsing.doh.json:8
+msgid "Filter"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.ahadns.blitz.json:8
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.rethinkdns.sky.json:8
+msgid "Filters"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.blahdns.doh.json:22
+msgid "Finland"
+msgstr ""
+
 #: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/status/include/71_https-dns-proxy.js:102
 msgid "Force DNS Ports"
 msgstr ""
@@ -215,6 +253,33 @@ msgstr ""
 msgid "Service Status"
 msgstr ""
 
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/one.comss.dns.json:13
+msgid "Siberia"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.blahdns.doh.json:30
+msgid "Singapore"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/org.snopyta.dns.doh.fi.json:2
+msgid "Snopyta DNS (FI)"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.ahadns.doh.json:22
+msgid "Spain"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/co.oszx.dns.json:18
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.adguard.dns.json:18
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.cloudflare-dns.json:18
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.controld.freedns.json:18
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.opendns.doh.json:18
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/gr.libredns.doh.json:18
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.mullvad.doh.json:19
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.quad9.json:14
+msgid "Standard"
+msgstr ""
+
 #: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/https-dns-proxy/status.js:300
 msgid "Start"
 msgstr ""
@@ -231,10 +296,34 @@ msgstr ""
 msgid "Stopping %s service"
 msgstr ""
 
-#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/status/include/71_https-dns-proxy.js:149
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/ch.switch.dns.json:2
+msgid "Switch DNS (CH)"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/com.blahdns.doh.json:14
+msgid "Switzerland"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/status/include/71_https-dns-proxy.js:148
 msgid "There are no active instances."
 msgstr ""
 
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/app.tiarap.doh.json:2
+msgid "Tiarap Public DNS (JP)"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.ahadns.doh.json:18
+msgid "US/Chicago"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.ahadns.doh.json:34
+msgid "US/Los Angeles"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/root/usr/share/https-dns-proxy/providers/net.ahadns.doh.json:46
+msgid "US/New York"
+msgstr ""
+
 #: applications/luci-app-https-dns-proxy/htdocs/luci-static/resources/view/https-dns-proxy/overview.js:245
 msgid "Unknown"
 msgstr ""
index b9989d538397fbe88347d8210a35e5e64ae7a5f1..cbf5ca28ac6d8e74616ba508fbeeba870b52b8c8 100644 (file)
@@ -7,10 +7,10 @@
                "option": {
                        "description": "Variant",
                        "type": "select",
-                       "regex": "(family.|)",
+                       "regex": "(familyshield.|)",
                        "options": [
                                {
-                                       "value": "family.",
+                                       "value": "familyshield.",
                                        "description": "Family Filter"
                                },
                                {