Skip to content

Commit

Permalink
luci-app-mosdns: update for 5.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sbwml committed Nov 1, 2023
1 parent 3ef6a85 commit b42fc88
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion luci-app-mosdns/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-mosdns
PKG_VERSION:=1.5.14
PKG_VERSION:=1.5.15
PKG_RELEASE:=1

LUCI_TITLE:=LuCI Support for mosdns
Expand Down
5 changes: 0 additions & 5 deletions luci-app-mosdns/luasrc/model/cbi/mosdns/basic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@ o.datatype = "and(uinteger,min(1),max(3))"
o.default = "2"
o:depends("configfile", "/etc/mosdns/config.yaml")

o = s:taboption("advanced", Value, "max_conns", translate("Maximum Connections"), translate("Set the Maximum connections for DoH and pipeline's TCP/DoT, Except for the HTTP/3 protocol"))
o.datatype = "and(uinteger,min(1))"
o.default = "2"
o:depends("configfile", "/etc/mosdns/config.yaml")

o = s:taboption("advanced", Value, "idle_timeout", translate("Idle Timeout"), translate("DoH/TCP/DoT Connection Multiplexing idle timeout (default 30 seconds)"))
o.datatype = "and(uinteger,min(1))"
o.default = "30"
Expand Down
6 changes: 0 additions & 6 deletions luci-app-mosdns/po/zh-cn/mosdns.po
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,6 @@ msgstr "DNS 服务器并发数(默认 2)"
msgid "DNS query request concurrency, The number of upstream DNS servers that are allowed to initiate requests at the same time"
msgstr "DNS 查询请求并发数,允许同时发起请求的上游 DNS 服务器数量"

msgid "Maximum Connections"
msgstr "最大连接数(默认 2)"

msgid "Set the Maximum connections for DoH and pipeline's TCP/DoT, Except for the HTTP/3 protocol"
msgstr "设置 DoH 和已启用 Query Pipelining 连接复用模式的 TCP/DoT 最大连接数,HTTP/3 协议除外"

msgid "Idle Timeout"
msgstr "空闲超时"

Expand Down
1 change: 0 additions & 1 deletion luci-app-mosdns/root/etc/config/mosdns
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ config mosdns 'config'
option cache_survival_time '86400'
option dump_file '0'
option concurrent '1'
option max_conns '2'
option idle_timeout '30'
option minimal_ttl '0'
option maximum_ttl '0'
Expand Down
9 changes: 4 additions & 5 deletions luci-app-mosdns/root/etc/init.d/mosdns
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ get_config() {
config_get bootstrap_dns $1 bootstrap_dns "119.29.29.29"
config_get listen_port_api $1 listen_port_api 9091
config_get concurrent $1 concurrent 1
config_get max_conns $1 max_conns 2
config_get insecure_skip_verify $1 insecure_skip_verify 0
config_get idle_timeout $1 idle_timeout 30
config_get enable_ecs_remote $1 enable_ecs_remote 0
Expand All @@ -73,9 +72,9 @@ init_yaml() {
local_dns=$($MOSDNS_SCRIPT dns | awk -v s=' ' '{
for(i=1; i<=NF; i++) {
if ($i ~ /^h3:\/\//) {
printf "%s- addr: \"%s\"\n%s bootstrap: '${bootstrap_dns}'\n%s enable_pipeline: '${enable_pipeline}'\n%s max_conns: '${max_conns}'\n%s insecure_skip_verify: '${insecure_skip_verify}'\n%s idle_timeout: '${idle_timeout}'\n%s enable_http3: true\n",s,$i,s,s,s,s,s,s
printf "%s- addr: \"%s\"\n%s bootstrap: '${bootstrap_dns}'\n%s enable_pipeline: '${enable_pipeline}'\n%s insecure_skip_verify: '${insecure_skip_verify}'\n%s idle_timeout: '${idle_timeout}'\n%s enable_http3: true\n",s,$i,s,s,s,s,s
} else {
printf "%s- addr: \"%s\"\n%s bootstrap: '${bootstrap_dns}'\n%s enable_pipeline: '${enable_pipeline}'\n%s max_conns: '${max_conns}'\n%s insecure_skip_verify: '${insecure_skip_verify}'\n%s idle_timeout: '${idle_timeout}'\n",s,$i,s,s,s,s,s
printf "%s- addr: \"%s\"\n%s bootstrap: '${bootstrap_dns}'\n%s enable_pipeline: '${enable_pipeline}'\n%s insecure_skip_verify: '${insecure_skip_verify}'\n%s idle_timeout: '${idle_timeout}'\n",s,$i,s,s,s,s
}
}
}')
Expand All @@ -86,9 +85,9 @@ init_yaml() {
remote_dns=$(echo $remote_dns | awk -v s=' ' '{
for(i=1; i<=NF; i++) {
if ($i ~ /^h3:\/\//) {
printf "%s- addr: \"%s\"\n%s bootstrap: '${bootstrap_dns}'\n%s enable_pipeline: '${enable_pipeline}'\n%s max_conns: '${max_conns}'\n%s insecure_skip_verify: '${insecure_skip_verify}'\n%s idle_timeout: '${idle_timeout}'\n%s enable_http3: true\n",s,$i,s,s,s,s,s,s
printf "%s- addr: \"%s\"\n%s bootstrap: '${bootstrap_dns}'\n%s enable_pipeline: '${enable_pipeline}'\n%s insecure_skip_verify: '${insecure_skip_verify}'\n%s idle_timeout: '${idle_timeout}'\n%s enable_http3: true\n",s,$i,s,s,s,s,s
} else {
printf "%s- addr: \"%s\"\n%s bootstrap: '${bootstrap_dns}'\n%s enable_pipeline: '${enable_pipeline}'\n%s max_conns: '${max_conns}'\n%s insecure_skip_verify: '${insecure_skip_verify}'\n%s idle_timeout: '${idle_timeout}'\n",s,$i,s,s,s,s,s
printf "%s- addr: \"%s\"\n%s bootstrap: '${bootstrap_dns}'\n%s enable_pipeline: '${enable_pipeline}'\n%s insecure_skip_verify: '${insecure_skip_verify}'\n%s idle_timeout: '${idle_timeout}'\n",s,$i,s,s,s,s
}
}
}')
Expand Down

0 comments on commit b42fc88

Please sign in to comment.