summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-dnscrypt-proxy
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-dnscrypt-proxy')
-rw-r--r--applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua31
-rw-r--r--applications/luci-app-dnscrypt-proxy/po/ja/dnscrypt-proxy.po29
-rw-r--r--applications/luci-app-dnscrypt-proxy/po/templates/dnscrypt-proxy.pot22
3 files changed, 75 insertions, 7 deletions
diff --git a/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua b/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua
index 602076ce0e..7ab84ab7fa 100644
--- a/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua
+++ b/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua
@@ -22,6 +22,12 @@ if not fs.access(res_input) then
luci.sys.call("env -i /bin/uclient-fetch --no-check-certificate -O " .. res_input .. " " .. url .. " >/dev/null 2>&1")
end
+if not uci:get_first("dnscrypt-proxy", "global") then
+ uci:add("dnscrypt-proxy", "global")
+ uci:save("dnscrypt-proxy")
+ uci:commit("dnscrypt-proxy")
+end
+
for line in io.lines(res_input) do
local name = line:match("^[%w_.-]*")
res_list[#res_list + 1] = { name = name }
@@ -39,8 +45,6 @@ function m.on_after_commit(self)
luci.sys.call("env -i /etc/init.d/dnscrypt-proxy restart >/dev/null 2>&1")
end
--- Trigger selection
-
s = m:section(TypedSection, "global", translate("General options"))
s.anonymous = true
@@ -83,6 +87,26 @@ if dump then
end
t.rmempty = true
+-- Extra options
+
+ds = s:option(DummyValue, "_dummy", translate("Extra options"),
+ translate("Options for further tweaking in case the defaults are not suitable for you."))
+ds.template = "cbi/nullsection"
+
+btn = s:option(Button, "", translate("Create custom config file"),
+ translate("Create '/etc/resolv-crypt.conf' with 'options timeout:1' to reduce DNS upstream timeouts with multiple DNSCrypt instances. ")
+ .. translatef("For further information "
+ .. "<a href=\"%s\" target=\"_blank\">"
+ .. "see the wiki online</a>", "https://wiki.openwrt.org/inbox/dnscrypt"))
+btn.inputtitle = translate("Create Config File")
+btn.inputstyle = "apply"
+btn.disabled = false
+function btn.write(self, section, value)
+ if not fs.access("/etc/resolv-crypt.conf") then
+ luci.sys.call("env -i echo 'options timeout:1' > '/etc/resolv-crypt.conf'")
+ end
+end
+
-- Mandatory options per instance
s = m:section(TypedSection, "dnscrypt-proxy", translate("Instance options"))
@@ -90,8 +114,7 @@ s.anonymous = true
s.addremove = true
o1 = s:option(Value, "address", translate("IP Address"),
- translate("The local IP address."))
-o1.datatype = "ip4addr"
+ translate("The local IPv4 or IPv6 address. The latter one should be specified within brackets, e.g. '[::1]'."))
o1.default = address or "127.0.0.1"
o1.rmempty = false
diff --git a/applications/luci-app-dnscrypt-proxy/po/ja/dnscrypt-proxy.po b/applications/luci-app-dnscrypt-proxy/po/ja/dnscrypt-proxy.po
index 9008d89540..0328df2279 100644
--- a/applications/luci-app-dnscrypt-proxy/po/ja/dnscrypt-proxy.po
+++ b/applications/luci-app-dnscrypt-proxy/po/ja/dnscrypt-proxy.po
@@ -34,6 +34,20 @@ msgstr ""
msgid "Configuration of the DNSCrypt-Proxy package."
msgstr "DNSCrypt-Proxy パッケージの設定です。"
+msgid ""
+"Create '/etc/resolv-crypt.conf' with 'options timeout:1' to reduce DNS "
+"upstream timeouts with multiple DNSCrypt instances."
+msgstr ""
+"複数の DNSCrypt インスタンスで DNS アップストリーム タイムアウトの設定値を共"
+"用するため、 'options timeout:1' を含めた '/etc/resolv-crypt.conf' を作成しま"
+"す。"
+
+msgid "Create Config File"
+msgstr "設定ファイルの作成"
+
+msgid "Create custom config file"
+msgstr "カスタム設定ファイルの作成"
+
msgid "DNS Query Logfile"
msgstr "DNS クエリ ログファイル"
@@ -64,6 +78,9 @@ msgstr "DNSCrypt-Proxy の高速化のため、キャッシュ機能を有効化
msgid "Ephemeral Keys"
msgstr "一時的なキー"
+msgid "Extra options"
+msgstr "拡張オプション"
+
msgid "File Checksum"
msgstr "ファイル チェックサム"
@@ -115,6 +132,10 @@ msgstr ""
msgid "Name of the remote DNS service for resolving queries."
msgstr "クエリの名前解決を行う、リモートの DNS サービス名です。"
+msgid ""
+"Options for further tweaking in case the defaults are not suitable for you."
+msgstr "デフォルト設定が適切でない場合、追加で設定するためのオプションです。"
+
msgid "Overview"
msgstr "概要"
@@ -149,8 +170,12 @@ msgstr "スタートアップ トリガ"
msgid "The listening port for DNS queries."
msgstr "DNS クエリを待ち受けるポートです。"
-msgid "The local IP address."
-msgstr "ローカル IP アドレスです。"
+msgid ""
+"The local IPv4 or IPv6 address. The latter one should be specified within "
+"brackets, e.g. '[::1]'."
+msgstr ""
+"ローカルの IPv4 または IPv6 アドレスです。 IPv6 アドレスの場合、ブラケット "
+"\"[ ]\" を含めて記述される必要があります(例: '[::1]')。"
msgid ""
"The value for this property is the blocklist type and path to the file, e."
diff --git a/applications/luci-app-dnscrypt-proxy/po/templates/dnscrypt-proxy.pot b/applications/luci-app-dnscrypt-proxy/po/templates/dnscrypt-proxy.pot
index 98e6526b41..ea83e7a184 100644
--- a/applications/luci-app-dnscrypt-proxy/po/templates/dnscrypt-proxy.pot
+++ b/applications/luci-app-dnscrypt-proxy/po/templates/dnscrypt-proxy.pot
@@ -21,6 +21,17 @@ msgstr ""
msgid "Configuration of the DNSCrypt-Proxy package."
msgstr ""
+msgid ""
+"Create '/etc/resolv-crypt.conf' with 'options timeout:1' to reduce DNS "
+"upstream timeouts with multiple DNSCrypt instances."
+msgstr ""
+
+msgid "Create Config File"
+msgstr ""
+
+msgid "Create custom config file"
+msgstr ""
+
msgid "DNS Query Logfile"
msgstr ""
@@ -51,6 +62,9 @@ msgstr ""
msgid "Ephemeral Keys"
msgstr ""
+msgid "Extra options"
+msgstr ""
+
msgid "File Checksum"
msgstr ""
@@ -95,6 +109,10 @@ msgstr ""
msgid "Name of the remote DNS service for resolving queries."
msgstr ""
+msgid ""
+"Options for further tweaking in case the defaults are not suitable for you."
+msgstr ""
+
msgid "Overview"
msgstr ""
@@ -127,7 +145,9 @@ msgstr ""
msgid "The listening port for DNS queries."
msgstr ""
-msgid "The local IP address."
+msgid ""
+"The local IPv4 or IPv6 address. The latter one should be specified within "
+"brackets, e.g. '[::1]'."
msgstr ""
msgid ""