* add HTTP/2-only supporting providers: Mullvad, Digitale-Gesellschaft, dns.sb and Rubyfish.cn
* switch default provider from Google to Cloudflare
* add IPv6 addresses for bootstrap resolvers for Google DNS
* add secondary bootstrap resolver (Cloudflare's) to all providers with a single bootstrap resolver
* modify model/cbi file to show HTTP/2-only providers (and help texts) on HTTP/2-supporting systems
Signed-off-by: Stan Grishin <stangri@melmac.net>
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
-PKG_VERSION:=2021-01-17-2
+PKG_VERSION:=2021-07-29-1
LUCI_TITLE:=DNS Over HTTPS Proxy Web UI
LUCI_DESCRIPTION:=Provides Web UI for DNS Over HTTPS Proxy
+++ /dev/null
-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"
-}
+++ /dev/null
-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"
-}
+++ /dev/null
-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"
-}
--- /dev/null
+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
+}
--- /dev/null
+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
+}
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
}
name = "odvr-nic-cz",
label = _("ODVR (nic.cz)"),
resolver_url = "https://odvr.nic.cz/doh",
- bootstrap_dns = "193.17.47.1,185.43.135.1"
+ bootstrap_dns = "193.17.47.1,185.43.135.1,2001:148f:ffff::1,2001:148f:fffe::1"
}
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"
}
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"
}
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"
}
--- /dev/null
+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
+}
--- /dev/null
+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
+}
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"
}
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"
}
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"
}
--- /dev/null
+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",
+ http2_only = true
+}
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"
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+://([^/]+)')
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))
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
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)
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:91
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:92
msgid "%s DoH at %s:%s"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:72
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:73
msgid "%s is not installed or not found"
msgstr ""
msgid "Cloudflare (Security Protection)"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:117
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:122
msgid "Configuration"
msgstr ""
msgid "DNS HTTPS Proxy"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:105
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:110
msgid "DNS HTTPS Proxy Settings"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/sb.dns.lua:3
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/sb.dns.lua:3
msgid "DNS.SB"
msgstr ""
msgid "DNSPod.cn Public DNS"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:184
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:195
msgid "DSCP Codepoint"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/ch.digitale-gesellschaft.dns.lua:3
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/ch.digitale-gesellschaft.dns.lua:3
msgid "Digitale Gesellschaft"
msgstr ""
msgid "Disable"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:125
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:130
msgid "Do not update configs"
msgstr ""
msgid "Enable"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:28
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:29
msgid "For more information on different options check"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:127
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:132
msgid "Force Router DNS"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:129
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:134
msgid "Force Router DNS server to all local devices"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:127
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:132
msgid "Forces Router DNS use on local devices, also known as DNS Hijacking."
msgstr ""
msgid "Google"
msgstr ""
+#: applications/luci-app-https-dns-proxy/root/usr/share/rpcd/acl.d/luci-app-https-dns-proxy.json:3
+msgid "Grant UCI and file access for luci-app-https-dns-proxy"
+msgstr ""
+
#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.idnet.doh.lua:3
msgid "IDNet.net (UK)"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:118
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:123
msgid ""
"If update option is selected, the 'DNS forwardings' section of %sDHCP and DNS"
"%s will be automatically updated to use selected DoH providers (%smore "
"information%s)."
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:133
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:138
msgid "Instances"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:128
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:133
msgid "Let local devices use their own DNS servers if set"
msgstr ""
msgid "LibreDNS (No Ads)"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:167
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:178
msgid "Listen Address"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:180
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:191
msgid "Listen Port"
msgstr ""
msgid "Loading"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.mullvad.doh.lua:3
+msgid "Mullvad"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.mullvad.doh.adblocker.lua:3
+msgid "Mullvad (AdBlock)"
+msgstr ""
+
#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/io.nextdns.dns.lua:3
msgid "NextDNS.io"
msgstr ""
msgid "OpenDNS (Family Shield)"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:188
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:199
msgid "Proxy Server"
msgstr ""
msgid "Reload"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:140
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:145
msgid "Resolver"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:113
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:118
msgid "Service Control"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:109
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:114
msgid "Service Status"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:107
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:112
msgid "Service Status [%s %s]"
msgstr ""
msgid "Stop"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:98
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:99
msgid "Stopped"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:64
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:65
msgid "Unknown Provider"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:122
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:127
msgid "Update %s config"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:118
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:123
msgid "Update DNSMASQ Config on Start/Stop"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:119
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:124
msgid "Update all configs"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:49
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:50
msgid "and"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:100
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:101
msgid "disabled"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/cn.rubyfish.dns.lua:3
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/cn.rubyfish.dns.lua:3
msgid "rubyfish.cn"
msgstr ""