function https_dns_proxy_action(name)
local packageName = "https-dns-proxy"
+ local http = require "luci.http"
+ local sys = require "luci.sys"
+ local util = require "luci.util"
if name == "start" then
- luci.sys.init.start(packageName)
+ sys.init.start(packageName)
elseif name == "action" then
- luci.util.exec("/etc/init.d/" .. packageName .. " reload >/dev/null 2>&1")
- luci.util.exec("/etc/init.d/dnsmasq restart >/dev/null 2>&1")
+ util.exec("/etc/init.d/" .. packageName .. " reload >/dev/null 2>&1")
elseif name == "stop" then
- luci.sys.init.stop(packageName)
+ sys.init.stop(packageName)
elseif name == "enable" then
- luci.sys.init.enable(packageName)
+ sys.init.enable(packageName)
elseif name == "disable" then
- luci.sys.init.disable(packageName)
+ sys.init.disable(packageName)
end
- luci.http.prepare_content("text/plain")
- luci.http.write("0")
+ http.prepare_content("text/plain")
+ http.write("0")
end
local uci = require("luci.model.uci").cursor()
local packageName = "https-dns-proxy"
+local readmeURL = "https://docs.openwrt.melmac.net/" .. packageName .. "/"
local providers_dir = "/usr/lib/lua/luci/" .. packageName .. "/providers/"
local helperText = ""
end
function createHelperText()
- local initText = "<br />" .. translate("For more information on different options check") .. " "
+ local initText = 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 })
buttons.template = packageName .. "/buttons"
end
+c = m:section(NamedSection, "config", "https-dns-proxy", translate("Configuration"), translatef("If update DNSMASQ config is selected, when you add/remove any instances below, they will be used to override the 'DNS forwardings' section of %sDHCP and DNS%s (%smore information%s).", "<a href=\"" .. dispatcher.build_url("admin/network/dhcp") .. "\">", "</a>", "<a href=\"" .. readmeURL .. "#default-settings" .. "\" target=\"_blank\">", "</a>"))
+d1 = c:option(ListValue, "update_dnsmasq_config", translate("Update DNSMASQ Config on Start/Stop"))
+d1:value('*', translate("Update all configs"))
+local dnsmasq_num = 0
+uci:foreach("dhcp", "dnsmasq", function(s)
+d1:value(tostring(dnsmasq_num), translatef("Update %s config", "dhcp.@dnsmasq[" .. tostring(dnsmasq_num) .. "]"))
+dnsmasq_num = dnsmasq_num + 1
+end)
+d1:value('-', translate("Do not update configs"))
+d1.default = '*'
+
createHelperText()
s3 = m:section(TypedSection, "https-dns-proxy", translate("Instances"),
- translatef("When you add/remove any instances below, they will be used to override the 'DNS forwardings' section of %sDHCP and DNS%s.", "<a href=\"" .. dispatcher.build_url("admin/network/dhcp") .. "\">", "</a>") .. helperText)
+ helperText)
s3.template = "cbi/tblsection"
s3.sortable = false
s3.anonymous = true
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:73
msgid "%s is not installed or not found"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/com.adguard.dns-family.lua:3
msgid "AdGuard (Family Protection)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/com.adguard.dns.lua:3
msgid "AdGuard (Standard)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/com.alidns.dns.lua:3
msgid "AliDNS"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/ca.cira.canadianshield.family.lua:3
msgid "CIRA Canadian Shield (Family)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/ca.cira.canadianshield.private.lua:3
msgid "CIRA Canadian Shield (Private)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/ca.cira.canadianshield.protected.lua:3
msgid "CIRA Canadian Shield (Protected)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-adult.lua:3
msgid "CleanBrowsing (Adult Filter)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-family.lua:3
msgid "CleanBrowsing (Family Filter)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/org.cleanbrowsing.doh-security.lua:3
msgid "CleanBrowsing (Security Filter)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/com.cloudflare-dns.lua:3
msgid "Cloudflare"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/com.cloudflare-dns.family.lua:3
msgid "Cloudflare (Family Protection)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/com.cloudflare-dns.security.lua:3
msgid "Cloudflare (Security Protection)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:126
+msgid "Configuration"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/luasrc/controller/https-dns-proxy.lua:4
msgid "DNS HTTPS Proxy"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:107
msgid "DNS HTTPS Proxy Settings"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/sb.dns.lua:3
msgid "DNS.SB"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/pub.doh.lua:3
msgid "DNSPod.cn Public DNS"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/ch.digitale-gesellschaft.dns.lua:3
msgid "Digitale Gesellschaft"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/buttons.htm:57
msgid "Disable"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:134
+msgid "Do not update configs"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/buttons.htm:54
msgid "Enable"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:28
msgid "For more information on different options check"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/google.dns.lua:3
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/model/cbi/https-dns-proxy.lua:126
+msgid ""
+"If update DNSMASQ config is selected, when you add/remove any instances "
+"below, they will be used to override the 'DNS forwardings' section of %sDHCP "
+"and DNS%s (%smore information%s)."
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:138
msgid "Instances"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/gr.libredns.doh.lua:3
msgid "LibreDNS"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/gr.libredns.doh-ads.lua:3
msgid "LibreDNS (No Ads)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:172
msgid "Listen address"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:185
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
msgid "ODVR (nic.cz)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/com.opendns.doh.lua:3
msgid "OpenDNS"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/com.opendns.familyshield.doh.lua:3
msgid "OpenDNS (Family Shield)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:189
msgid "Proxy server"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.quad9.dns.lua:3
msgid "Quad 9 (Recommended)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.quad9.dns11.lua:3
msgid "Quad 9 (Secured with ECS Support)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.quad9.dns9.lua:3
msgid "Quad 9 (Secured)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.quad9.dns10.lua:3
msgid "Quad 9 (Unsecured)"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/buttons.htm:44
msgid "Reload"
msgstr ""
+#: 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:99
msgid "Running: %s DoH at %s:%s"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:111
msgid "Service Status"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:109
msgid "Service Status [%s %s]"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/buttons.htm:41
msgid "Start"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/buttons.htm:47
msgid "Stop"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:77
msgid "Stopped"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:64
msgid "Unknown Provider"
msgstr ""
-msgid ""
-"When you add/remove any instances below, they will be used to override the "
-"'DNS forwardings' section of %sDHCP and DNS%s."
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:131
+msgid "Update %s config"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:127
+msgid "Update DNSMASQ Config on Start/Stop"
+msgstr ""
+
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:128
+msgid "Update all configs"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:49
msgid "and"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:79
msgid "disabled"
msgstr ""
+#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers.disabled/cn.rubyfish.dns.lua:3
msgid "rubyfish.cn"
msgstr ""