luci-app-ssr-plus: sync upstream

last commit: 3d45c0384e
This commit is contained in:
actions 2024-06-20 12:25:01 +08:00
parent 3e8d165b4d
commit dc771f96df
6 changed files with 36 additions and 53 deletions

View File

@ -412,7 +412,9 @@ o.datatype = "uinteger"
o.default = "30"
o = s:option(Value, "keepaliveperiod", translate("The keep-alive period.(Unit:second)"))
o.description = translate("Default value 0 indicatesno heartbeat.")
o:depends({type = "hysteria", flag_quicparam = "1"})
o:depends({type = "v2ray", v2ray_protocol = "wireguard"})
o.rmempty = true
o.datatype = "uinteger"
o.default = "10"
@ -525,9 +527,7 @@ o.default = "3"
o.rmempty = true
o = s:option(Value, "timeout", translate("Timeout for establishing a connection to server(second)"))
o.description = translate("Default value 0 indicatesno heartbeat.")
o:depends("type", "tuic")
o:depends({type = "v2ray", v2ray_protocol = "wireguard"})
o.datatype = "uinteger"
o.default = "8"
o.rmempty = true
@ -568,6 +568,7 @@ o.rmempty = true
-- Tuic settings for the local inbound socks5 server
o = s:option(Flag, "tuic_dual_stack", translate("Dual-stack Listening Socket"))
o.description = translate("If this option is not set, the socket behavior is platform dependent.")
o:depends("type", "tuic")
o.default = "0"
o.rmempty = true
@ -941,7 +942,8 @@ o:depends("reality", true)
o.rmempty = true
o = s:option(DynamicList, "tls_alpn", translate("TLS ALPN"))
o:depends({type = "tuic", tls = true})
o:depends("type", "tuic")
o.default = "h3"
o.rmempty = true
-- [[ allowInsecure ]]--

View File

@ -1029,6 +1029,9 @@ msgstr "接收窗口无需确认即可接收的最大字节数默认8Mb
msgid "Dual-stack Listening Socket"
msgstr "双栈 Socket 监听"
msgid "If this option is not set, the socket behavior is platform dependent."
msgstr "如果未设置此选项,则 Socket 行为依赖于平台。"
msgid "Maximum packet size the socks5 server can receive from external"
msgstr "socks5 服务器可以从外部接收的最大数据包大小(单位:字节)"

View File

@ -1,10 +1,12 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
[ -e "/etc/config/ucitrack" ] && {
delete ucitrack.@shadowsocksr[-1]
add ucitrack shadowsocksr
set ucitrack.@shadowsocksr[-1].init=shadowsocksr
commit ucitrack
}
delete firewall.shadowsocksr
set firewall.shadowsocksr=include

View File

@ -73,7 +73,7 @@ function wireguard()
publicKey = server.peer_pubkey,
preSharedKey = server.preshared_key,
endpoint = server.server .. ":" .. server.server_port,
keepAlive = tonumber(server.heartbeat),
keepAlive = tonumber(server.keepaliveperiod),
allowedIPs = (server.allowedips) or nil,
}
},
@ -476,8 +476,8 @@ local tuic = {
receive_window = tonumber(server.receive_window)
},
["local"] = {
server = tonumber(socks_port) and (server.tuic_dual_stack == "1" and "[::1]:" or "127.0.0.1:") .. (socks_port == "0" and local_port or tonumber(socks_port)),
dual_stack = (server.tuic_dual_stack == "1") and true or false,
server = tonumber(socks_port) and "[::]:" .. (socks_port == "0" and local_port or tonumber(socks_port)),
dual_stack = (server.tuic_dual_stack == "1") and true or nil,
max_packet_size = tonumber(server.tuic_max_package_size)
}
}

View File

@ -0,0 +1,4 @@
{
"config": "shadowsocksr",
"init": "shadowsocksr"
}

View File

@ -1,28 +1,3 @@
From e0f9cf419ee84763792fecf1d8baa5371be068b1 Mon Sep 17 00:00:00 2001
From: sbwml <admin@cooluc.com>
Date: Tue, 9 Apr 2024 14:48:49 +0800
Subject: [PATCH] patch luci-app-ssr-plus
Signed-off-by: sbwml <admin@cooluc.com>
---
luci-app-ssr-plus/Makefile | 33 +++--
.../luasrc/controller/shadowsocksr.lua | 2 +-
.../model/cbi/shadowsocksr/advanced.lua | 39 ------
.../luasrc/model/cbi/shadowsocksr/client.lua | 22 +--
.../luasrc/model/cbi/shadowsocksr/status.lua | 2 +-
.../luasrc/view/shadowsocksr/check.htm | 4 +-
.../luasrc/view/shadowsocksr/refresh.htm | 6 +-
.../luasrc/view/shadowsocksr/reset.htm | 4 +-
.../luasrc/view/shadowsocksr/server_list.htm | 8 +-
.../luasrc/view/shadowsocksr/ssrurl.htm | 22 +--
luci-app-ssr-plus/po/zh-cn/ssr-plus.po | 21 ---
.../root/etc/init.d/shadowsocksr | 131 ++++--------------
.../root/etc/ssrplus/mosdns-config.yaml | 43 ------
luci-app-ssr-plus/root/etc/ssrplus/white.list | 40 +++++-
luci-app-ssr-plus/root/usr/bin/ssr-monitor | 10 --
15 files changed, 107 insertions(+), 280 deletions(-)
delete mode 100644 luci-app-ssr-plus/root/etc/ssrplus/mosdns-config.yaml
diff --git a/luci-app-ssr-plus/Makefile b/luci-app-ssr-plus/Makefile
index 82e06b3..17e6a6b 100644
--- a/luci-app-ssr-plus/Makefile
@ -455,7 +430,7 @@ index 479d7e2..5eecbee 100644
}
}
diff --git a/luci-app-ssr-plus/po/zh-cn/ssr-plus.po b/luci-app-ssr-plus/po/zh-cn/ssr-plus.po
index 632b5c9..cba9707 100644
index e292f10..07c6dbc 100644
--- a/luci-app-ssr-plus/po/zh-cn/ssr-plus.po
+++ b/luci-app-ssr-plus/po/zh-cn/ssr-plus.po
@@ -552,27 +552,6 @@ msgstr "使用 DNS2TCP 查询"
@ -875,6 +850,3 @@ index f637d50..fb9ed57 100755
fi
#chinadns-ng
if [ "$(uci -q get "dhcp.@dnsmasq[0]._unused_ssrp_changed")" = "1" ]; then
--
2.42.0