diff options
Diffstat (limited to 'applications/luci-app-https-dns-proxy/luasrc')
15 files changed, 57 insertions, 25 deletions
diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/ch.digitale-gesellschaft.dns.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/ch.digitale-gesellschaft.dns.lua deleted file mode 100644 index fc190437ca..0000000000 --- a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/ch.digitale-gesellschaft.dns.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - name = "Digitale-Gesellschaft", - label = _("Digitale Gesellschaft"), - resolver_url = "https://dns.digitale-gesellschaft.ch/dns-query", - bootstrap_dns = "185.95.218.42,185.95.218.43" -} diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/cn.rubyfish.dns.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/cn.rubyfish.dns.lua deleted file mode 100644 index 86c4c56dc1..0000000000 --- a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/cn.rubyfish.dns.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - name = "rubyfish.cn", - label = _("rubyfish.cn"), - resolver_url = "https://dns.rubyfish.cn/dns-query", - bootstrap_dns = "118.89.110.78,47.96.179.163" -} diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/ch.digitale-gesellschaft.dns.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/ch.digitale-gesellschaft.dns.lua new file mode 100644 index 0000000000..9ee48bde1d --- /dev/null +++ b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/ch.digitale-gesellschaft.dns.lua @@ -0,0 +1,7 @@ +return { + name = "Digitale-Gesellschaft", + label = _("Digitale Gesellschaft"), + resolver_url = "https://dns.digitale-gesellschaft.ch/dns-query", + bootstrap_dns = "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + http2_only = true +} diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/cn.rubyfish.dns.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/cn.rubyfish.dns.lua new file mode 100644 index 0000000000..c9cee095b3 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/cn.rubyfish.dns.lua @@ -0,0 +1,7 @@ +return { + name = "rubyfish.cn", + label = _("rubyfish.cn"), + resolver_url = "https://dns.rubyfish.cn/dns-query", + bootstrap_dns = "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + http2_only = true +} diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/com.cloudflare-dns.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/com.cloudflare-dns.lua index 7e30c125c8..6db508e964 100644 --- a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/com.cloudflare-dns.lua +++ b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/com.cloudflare-dns.lua @@ -4,5 +4,6 @@ return { resolver_url = "https://cloudflare-dns.com/dns-query", bootstrap_dns = "1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001", help_link = "https://one.one.one.one/family/", - help_link_text = "Cloudflare" + help_link_text = "Cloudflare", + default = true } diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/google.dns.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/google.dns.lua index 6eab04064b..e3824cc7d5 100644 --- a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/google.dns.lua +++ b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/google.dns.lua @@ -2,6 +2,5 @@ return { name = "Google", label = _("Google"), resolver_url = "https://dns.google/dns-query", - bootstrap_dns = "8.8.8.8,8.8.4.4", - default = true + bootstrap_dns = "8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844" } diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/gr.libredns.doh-ads.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/gr.libredns.doh-ads.lua index 22e6fffe41..cdede4d035 100644 --- a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/gr.libredns.doh-ads.lua +++ b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/gr.libredns.doh-ads.lua @@ -2,7 +2,7 @@ return { name = "LibreDNS (No Ads)", label = _("LibreDNS (No Ads)"), resolver_url = "https://doh.libredns.gr/ads", - bootstrap_dns = "116.202.176.26", + bootstrap_dns = "116.202.176.26,1.1.1.1", help_link = "https://libredns.gr/", help_link_text = "LibreDNS.gr" } diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/gr.libredns.doh.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/gr.libredns.doh.lua index bd51e1be42..99d41508bb 100644 --- a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/gr.libredns.doh.lua +++ b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/gr.libredns.doh.lua @@ -2,7 +2,7 @@ return { name = "LibreDNS", label = _("LibreDNS"), resolver_url = "https://doh.libredns.gr/dns-query", - bootstrap_dns = "116.202.176.26", + bootstrap_dns = "116.202.176.26,1.1.1.1", help_link = "https://libredns.gr/", help_link_text = "LibreDNS.gr" } diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.mullvad.doh.adblocker.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.mullvad.doh.adblocker.lua new file mode 100644 index 0000000000..d225f3f877 --- /dev/null +++ b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.mullvad.doh.adblocker.lua @@ -0,0 +1,9 @@ +return { + name="mullvad-adblock", + label=_("Mullvad (AdBlock)"), + resolver_url="https://adblock.doh.mullvad.net/dns-query", + bootstrap_dns="1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + help_link="https://mullvad.net/en/help/dns-over-https-and-dns-over-tls/", + help_link_text="Mullvad.net", + http2_only = true +} diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.mullvad.doh.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.mullvad.doh.lua new file mode 100644 index 0000000000..0aa97c40fb --- /dev/null +++ b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.mullvad.doh.lua @@ -0,0 +1,9 @@ +return { + name="mullvad", + label=_("Mullvad"), + resolver_url="https://doh.mullvad.net/dns-query", + bootstrap_dns="1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001,8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844", + help_link="https://mullvad.net/en/help/dns-over-https-and-dns-over-tls/", + help_link_text="Mullvad.net", + http2_only = true +} diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-adult.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-adult.lua index 5b4d908543..ed6168be24 100644 --- a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-adult.lua +++ b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-adult.lua @@ -2,7 +2,7 @@ return { name = "CleanBrowsing-Adult", label = _("CleanBrowsing (Adult Filter)"), resolver_url = "https://doh.cleanbrowsing.org/doh/adult-filter/", - bootstrap_dns = "185.228.168.168", + bootstrap_dns = "185.228.168.168,1.1.1.1", help_link = "https://cleanbrowsing.org/guides/dnsoverhttps", help_link_text = "CleanBrowsing.org" } diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-family.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-family.lua index 47a0654d22..05f4115236 100644 --- a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-family.lua +++ b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-family.lua @@ -2,7 +2,7 @@ return { name = "CleanBrowsing-Family", label = _("CleanBrowsing (Family Filter)"), resolver_url = "https://doh.cleanbrowsing.org/doh/family-filter/", - bootstrap_dns = "185.228.168.168", + bootstrap_dns = "185.228.168.168,1.1.1.1", help_link = "https://cleanbrowsing.org/guides/dnsoverhttps", help_link_text = "CleanBrowsing.org" } diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-security.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-security.lua index 6e370d513f..9649fc252c 100644 --- a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-security.lua +++ b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-security.lua @@ -2,7 +2,7 @@ return { name = "CleanBrowsing-Security", label = _("CleanBrowsing (Security Filter)"), resolver_url = "https://doh.cleanbrowsing.org/doh/security-filter/", - bootstrap_dns = "185.228.168.168", + bootstrap_dns = "185.228.168.168,1.1.1.1", help_link = "https://cleanbrowsing.org/guides/dnsoverhttps", help_link_text = "CleanBrowsing.org" } diff --git a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/sb.dns.lua b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/sb.dns.lua index 114d23ed5b..9c38122a2b 100644 --- a/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/sb.dns.lua +++ b/applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/sb.dns.lua @@ -2,5 +2,6 @@ return { name = "DNS.SB", label = _("DNS.SB"), resolver_url = "https://doh.dns.sb/dns-query", - bootstrap_dns = "185.222.222.222,185.184.222.222" + bootstrap_dns = "185.222.222.222,185.184.222.222", + http2_only = true } diff --git a/applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua b/applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua index 620c8d6c88..a8e45b5807 100644 --- a/applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua +++ b/applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua @@ -9,6 +9,7 @@ local packageName = "https-dns-proxy" local readmeURL = "https://docs.openwrt.melmac.net/" .. packageName .. "/" local providers_dir = "/usr/lib/lua/luci/" .. packageName .. "/providers/" local helperText = "" +local http2Supported = false function getPackageVersion() local opkgFile = "/usr/lib/opkg/status" @@ -30,7 +31,7 @@ function createHelperText() local p_func = loadfile(providers_dir .. filename) setfenv(p_func, { _ = i18n.translate }) local p = p_func() - if p.help_link then + if p.help_link and (not p.http2_only or http2Supported) then local url, domain url = p.help_link domain = p.help_link_text or url:match('^%w+://([^/]+)') @@ -102,6 +103,10 @@ else end end +if sys.call("curl --version | grep -q HTTP2") == 0 then + http2Supported = true +end + m = Map("https-dns-proxy", translate("DNS HTTPS Proxy Settings")) h = m:section(TypedSection, "_dummy", translatef("Service Status [%s %s]", packageName, packageVersion)) @@ -142,7 +147,9 @@ for filename in fs.dir(providers_dir) do local p_func = loadfile(providers_dir .. filename) setfenv(p_func, { _ = i18n.translate }) local p = p_func() - prov:value(p.resolver_url, p.label) + if not p.http2_only or http2Supported then + prov:value(p.resolver_url, p.label) + end if p.default then prov.default = p.resolver_url end @@ -157,8 +164,12 @@ prov.write = function(self, section, value) value = value:gsub('[%p%c%s]', '') p.url_match = p.resolver_url:gsub('[%p%c%s]', '') if value:match(p.url_match) then - uci:set(packageName, section, "bootstrap_dns", p.bootstrap_dns) - uci:set(packageName, section, "resolver_url", p.resolver_url) + if p.bootstrap_dns then + uci:set(packageName, section, "bootstrap_dns", p.bootstrap_dns) + end + if p.resolver_url then + uci:set(packageName, section, "resolver_url", p.resolver_url) + end end end uci:save(packageName) |