Merge pull request #3852 from stangri/master-luci-app-https-dns-proxy
luci-app-https-dns-proxy: Move help links to providers files
This commit is contained in:
commit
4b3397490f
14 changed files with 94 additions and 54 deletions
|
@ -10,7 +10,7 @@ LUCI_TITLE:=DNS Over HTTPS Proxy Web UI
|
||||||
LUCI_DESCRIPTION:=Provides Web UI for DNS Over HTTPS Proxy
|
LUCI_DESCRIPTION:=Provides Web UI for DNS Over HTTPS Proxy
|
||||||
LUCI_DEPENDS:=+luci-compat +luci-mod-admin-full +https-dns-proxy
|
LUCI_DEPENDS:=+luci-compat +luci-mod-admin-full +https-dns-proxy
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
include ../../luci.mk
|
include ../../luci.mk
|
||||||
|
|
||||||
|
|
|
@ -2,5 +2,7 @@ return {
|
||||||
name = "AdGuard-Family",
|
name = "AdGuard-Family",
|
||||||
label = _("AdGuard (Family Protection)"),
|
label = _("AdGuard (Family Protection)"),
|
||||||
resolver_url = "https://dns-family.adguard.com/dns-query",
|
resolver_url = "https://dns-family.adguard.com/dns-query",
|
||||||
bootstrap_dns = "176.103.130.132,176.103.130.134"
|
bootstrap_dns = "176.103.130.132,176.103.130.134",
|
||||||
|
help_link = "https://adguard.com/en/adguard-dns/overview.html",
|
||||||
|
help_link_text = "AdGuard.com"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,7 @@ return {
|
||||||
name = "AdGuard-Standard",
|
name = "AdGuard-Standard",
|
||||||
label = _("AdGuard (Standard)"),
|
label = _("AdGuard (Standard)"),
|
||||||
resolver_url = "https://dns.adguard.com/dns-query",
|
resolver_url = "https://dns.adguard.com/dns-query",
|
||||||
bootstrap_dns = "176.103.130.130,176.103.130.131"
|
bootstrap_dns = "176.103.130.130,176.103.130.131",
|
||||||
|
help_link = "https://adguard.com/en/adguard-dns/overview.html",
|
||||||
|
help_link_text = "AdGuard.com"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
return {
|
return {
|
||||||
name = "LibreDNS",
|
name = "LibreDNS (No Ads)",
|
||||||
label = _("LibreDNS (No Ads)"),
|
label = _("LibreDNS (No Ads)"),
|
||||||
resolver_url = "https://doh.libredns.gr/ads",
|
resolver_url = "https://doh.libredns.gr/ads",
|
||||||
bootstrap_dns = "116.202.176.26"
|
bootstrap_dns = "116.202.176.26",
|
||||||
|
help_link = "https://libredns.gr/",
|
||||||
|
help_link_text = "LibreDNS.gr"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,7 @@ return {
|
||||||
name = "LibreDNS",
|
name = "LibreDNS",
|
||||||
label = _("LibreDNS"),
|
label = _("LibreDNS"),
|
||||||
resolver_url = "https://doh.libredns.gr/dns-query",
|
resolver_url = "https://doh.libredns.gr/dns-query",
|
||||||
bootstrap_dns = "116.202.176.26"
|
bootstrap_dns = "116.202.176.26",
|
||||||
|
help_link = "https://libredns.gr/",
|
||||||
|
help_link_text = "LibreDNS.gr"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,7 @@ return {
|
||||||
name = "Quad9-Recommended",
|
name = "Quad9-Recommended",
|
||||||
label = _("Quad 9 (Recommended)"),
|
label = _("Quad 9 (Recommended)"),
|
||||||
resolver_url = "https://dns.quad9.net/dns-query",
|
resolver_url = "https://dns.quad9.net/dns-query",
|
||||||
bootstrap_dns = "9.9.9.9,149.112.112.112"
|
bootstrap_dns = "9.9.9.9,149.112.112.112",
|
||||||
|
help_link = "https://www.quad9.net/doh-quad9-dns-servers/",
|
||||||
|
help_link_text = "Quad9.net"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,7 @@ return {
|
||||||
name = "Quad9-Unsecured",
|
name = "Quad9-Unsecured",
|
||||||
label = _("Quad 9 (Unsecured)"),
|
label = _("Quad 9 (Unsecured)"),
|
||||||
resolver_url = "https://dns10.quad9.net/dns-query",
|
resolver_url = "https://dns10.quad9.net/dns-query",
|
||||||
bootstrap_dns = "9.9.9.10,149.112.112.10"
|
bootstrap_dns = "9.9.9.10,149.112.112.10",
|
||||||
|
help_link = "https://www.quad9.net/doh-quad9-dns-servers/",
|
||||||
|
help_link_text = "Quad9.net"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,7 @@ return {
|
||||||
name = "Quad9-ECS",
|
name = "Quad9-ECS",
|
||||||
label = _("Quad 9 (Secured with ECS Support)"),
|
label = _("Quad 9 (Secured with ECS Support)"),
|
||||||
resolver_url = "https://dns11.quad9.net/dns-query",
|
resolver_url = "https://dns11.quad9.net/dns-query",
|
||||||
bootstrap_dns = "9.9.9.11,149.112.112.11"
|
bootstrap_dns = "9.9.9.11,149.112.112.11",
|
||||||
|
help_link = "https://www.quad9.net/doh-quad9-dns-servers/",
|
||||||
|
help_link_text = "Quad9.net"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,7 @@ return {
|
||||||
name = "Quad9-Secured",
|
name = "Quad9-Secured",
|
||||||
label = _("Quad 9 (Secured)"),
|
label = _("Quad 9 (Secured)"),
|
||||||
resolver_url = "https://dns9.quad9.net/dns-query",
|
resolver_url = "https://dns9.quad9.net/dns-query",
|
||||||
bootstrap_dns = "9.9.9.9,149.112.112.9"
|
bootstrap_dns = "9.9.9.9,149.112.112.9",
|
||||||
|
help_link = "https://www.quad9.net/doh-quad9-dns-servers/",
|
||||||
|
help_link_text = "Quad9.net"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,7 @@ return {
|
||||||
name = "CleanBrowsing-Adult",
|
name = "CleanBrowsing-Adult",
|
||||||
label = _("CleanBrowsing (Adult Filter)"),
|
label = _("CleanBrowsing (Adult Filter)"),
|
||||||
resolver_url = "https://doh.cleanbrowsing.org/doh/adult-filter/",
|
resolver_url = "https://doh.cleanbrowsing.org/doh/adult-filter/",
|
||||||
bootstrap_dns = "185.228.168.168"
|
bootstrap_dns = "185.228.168.168",
|
||||||
|
help_link = "https://cleanbrowsing.org/guides/dnsoverhttps",
|
||||||
|
help_link_text = "CleanBrowsing.org"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,7 @@ return {
|
||||||
name = "CleanBrowsing-Family",
|
name = "CleanBrowsing-Family",
|
||||||
label = _("CleanBrowsing (Family Filter)"),
|
label = _("CleanBrowsing (Family Filter)"),
|
||||||
resolver_url = "https://doh.cleanbrowsing.org/doh/family-filter/",
|
resolver_url = "https://doh.cleanbrowsing.org/doh/family-filter/",
|
||||||
bootstrap_dns = "185.228.168.168"
|
bootstrap_dns = "185.228.168.168",
|
||||||
|
help_link = "https://cleanbrowsing.org/guides/dnsoverhttps",
|
||||||
|
help_link_text = "CleanBrowsing.org"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,7 @@ return {
|
||||||
name = "CleanBrowsing-Security",
|
name = "CleanBrowsing-Security",
|
||||||
label = _("CleanBrowsing (Security Filter)"),
|
label = _("CleanBrowsing (Security Filter)"),
|
||||||
resolver_url = "https://doh.cleanbrowsing.org/doh/security-filter/",
|
resolver_url = "https://doh.cleanbrowsing.org/doh/security-filter/",
|
||||||
bootstrap_dns = "185.228.168.168"
|
bootstrap_dns = "185.228.168.168",
|
||||||
|
help_link = "https://cleanbrowsing.org/guides/dnsoverhttps",
|
||||||
|
help_link_text = "CleanBrowsing.org"
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,33 @@ local uci = require("luci.model.uci").cursor()
|
||||||
|
|
||||||
local packageName = "https-dns-proxy"
|
local packageName = "https-dns-proxy"
|
||||||
local providers_dir = "/usr/lib/lua/luci/" .. packageName .. "/providers/"
|
local providers_dir = "/usr/lib/lua/luci/" .. packageName .. "/providers/"
|
||||||
|
local helperText = ""
|
||||||
|
|
||||||
|
function create_helper_text()
|
||||||
|
local initText = "<br />" .. translate("For more information on different options check") .. " "
|
||||||
|
for filename in fs.dir(providers_dir) do
|
||||||
|
local p_func = loadfile(providers_dir .. filename)
|
||||||
|
setfenv(p_func, { _ = i18n.translate })
|
||||||
|
local p = p_func()
|
||||||
|
if p.help_link then
|
||||||
|
local url, domain
|
||||||
|
url = p.help_link
|
||||||
|
domain = p.help_link_text or url:match('^%w+://([^/]+)')
|
||||||
|
if not helperText:find(domain) then
|
||||||
|
if helperText == "" then
|
||||||
|
helperText = initText
|
||||||
|
else
|
||||||
|
helperText = helperText .. ", "
|
||||||
|
end
|
||||||
|
helperText = helperText .. [[<a href="]] .. url .. [[">]] .. domain .. [[</a>]]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if helperText ~= "" then
|
||||||
|
local a = helperText:gsub('(.*),%s.*$', '%1')
|
||||||
|
helperText = a .. " " .. translate("and") .. helperText:sub(#a + 2) .. "."
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function get_provider_name(value)
|
function get_provider_name(value)
|
||||||
for filename in fs.dir(providers_dir) do
|
for filename in fs.dir(providers_dir) do
|
||||||
|
@ -83,19 +110,10 @@ else
|
||||||
buttons.template = packageName .. "/buttons"
|
buttons.template = packageName .. "/buttons"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_helper_text()
|
||||||
s3 = m:section(TypedSection, "https-dns-proxy", translate("Instances"), translate("When you add/remove any instances below, they will be used to override the 'DNS forwardings' section of ")
|
s3 = m:section(TypedSection, "https-dns-proxy", translate("Instances"), translate("When you add/remove any instances below, they will be used to override the 'DNS forwardings' section of ")
|
||||||
.. [[ <a href="]] .. dispatcher.build_url("admin/network/dhcp") .. [[">]]
|
.. [[ <a href="]] .. dispatcher.build_url("admin/network/dhcp") .. [[">]]
|
||||||
.. translate("DHCP and DNS") .. [[</a>]] .. "."
|
.. translate("DHCP and DNS") .. [[</a>]] .. "." .. helperText)
|
||||||
.. "<br />"
|
|
||||||
.. translate("For more information on different options check ")
|
|
||||||
.. [[ <a href="https://adguard.com/en/adguard-dns/overview.html">]]
|
|
||||||
.. "AdGuard.com" .. [[</a>]] .. ", "
|
|
||||||
.. [[ <a href="https://cleanbrowsing.org/guides/dnsoverhttps">]]
|
|
||||||
.. "CleanBrowsing.org" .. [[</a>]] .. " "
|
|
||||||
.. [[ <a href="https://libredns.gr/">]]
|
|
||||||
.. "Libredns.gr" .. [[</a]] .. " " .. translate("and") .. " "
|
|
||||||
.. [[ <a href="https://www.quad9.net/doh-quad9-dns-servers/">]]
|
|
||||||
.. "Quad9.net" .. [[</a>]] .. ".")
|
|
||||||
s3.template = "cbi/tblsection"
|
s3.template = "cbi/tblsection"
|
||||||
s3.sortable = false
|
s3.sortable = false
|
||||||
s3.anonymous = true
|
s3.anonymous = true
|
||||||
|
|
|
@ -25,7 +25,7 @@ msgstr ""
|
||||||
msgid "Cloudflare"
|
msgid "Cloudflare"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:88
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:116
|
||||||
msgid "DHCP and DNS"
|
msgid "DHCP and DNS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ msgstr ""
|
||||||
msgid "DNS Over HTTPS Proxy"
|
msgid "DNS Over HTTPS Proxy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:67
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:94
|
||||||
msgid "DNS Over HTTPS Proxy Settings"
|
msgid "DNS Over HTTPS Proxy Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -49,11 +49,11 @@ msgstr ""
|
||||||
msgid "Disable"
|
msgid "Disable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:59
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:86
|
||||||
msgid "DoH"
|
msgid "DoH"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:146
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:166
|
||||||
msgid "EDNS client subnet"
|
msgid "EDNS client subnet"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ msgstr ""
|
||||||
msgid "Enable"
|
msgid "Enable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:90
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:13
|
||||||
msgid "For more information on different options check"
|
msgid "For more information on different options check"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -69,22 +69,10 @@ msgstr ""
|
||||||
msgid "Google"
|
msgid "Google"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:86
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:114
|
||||||
msgid "Instances"
|
msgid "Instances"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:129
|
|
||||||
msgid "Listen address"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:142
|
|
||||||
msgid "Listen port"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/js.htm:52
|
|
||||||
msgid "Loading"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/gr.libredns.doh.lua:3
|
#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/gr.libredns.doh.lua:3
|
||||||
msgid "LibreDNS"
|
msgid "LibreDNS"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -93,11 +81,23 @@ msgstr ""
|
||||||
msgid "LibreDNS (No Ads)"
|
msgid "LibreDNS (No Ads)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:149
|
||||||
|
msgid "Listen address"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:162
|
||||||
|
msgid "Listen port"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/js.htm:52
|
||||||
|
msgid "Loading"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/cz.nic.odvr.lua:3
|
#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/cz.nic.odvr.lua:3
|
||||||
msgid "ODVR (nic.cz)"
|
msgid "ODVR (nic.cz)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:149
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:169
|
||||||
msgid "Proxy server"
|
msgid "Proxy server"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -121,16 +121,16 @@ msgstr ""
|
||||||
msgid "Reload"
|
msgid "Reload"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:102
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:122
|
||||||
msgid "Resolver"
|
msgid "Resolver"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:59
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:86
|
||||||
msgid "Running"
|
msgid "Running"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:69
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:96
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:71
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:98
|
||||||
msgid "Service Status"
|
msgid "Service Status"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -142,33 +142,33 @@ msgstr ""
|
||||||
msgid "Stop"
|
msgid "Stop"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:37
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:64
|
||||||
msgid "Stopped"
|
msgid "Stopped"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:22
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:49
|
||||||
msgid "Unknown Provider"
|
msgid "Unknown Provider"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:86
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:114
|
||||||
msgid ""
|
msgid ""
|
||||||
"When you add/remove any instances below, they will be used to override the "
|
"When you add/remove any instances below, they will be used to override the "
|
||||||
"'DNS forwardings' section of"
|
"'DNS forwardings' section of"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:94
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:34
|
||||||
msgid "and"
|
msgid "and"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:59
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:86
|
||||||
msgid "at"
|
msgid "at"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:39
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:66
|
||||||
msgid "disabled"
|
msgid "disabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:32
|
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:59
|
||||||
msgid "is not installed or not found"
|
msgid "is not installed or not found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue