From d330c6f24343d0ba3a7d0951c664baf208641bc8 Mon Sep 17 00:00:00 2001 From: zxlhhyccc <45259624+zxlhhyccc@users.noreply.github.com> Date: Thu, 18 Apr 2024 23:43:58 +0800 Subject: [PATCH 1/3] luci-app-ssr-plus: fix typo and master branch cannot run issue --- .../luasrc/model/cbi/shadowsocksr/client-config.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index 280d03caacd..cd993d9d903 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -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 From f3132727ae614e9620423dd0a82f0c3d3f1828a0 Mon Sep 17 00:00:00 2001 From: zxlhhyccc <45259624+zxlhhyccc@users.noreply.github.com> Date: Thu, 18 Apr 2024 23:45:56 +0800 Subject: [PATCH 2/3] luci-app-ssr-plus: fix typo and master branch cannot run issue --- luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua index 3b91739dc32..cd1b2070dbe 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua @@ -168,5 +168,10 @@ if is_finded("chinadns-ng") then end end +m.apply_on_parse = true +m.on_after_apply = function(self,map) + luci.sys.call("/etc/init.d/shadowsocksr restart >/dev/null 2>&1 &") +end + return m From f7db5c5bdc2fedc93355dafda6c806b5537dc94b Mon Sep 17 00:00:00 2001 From: zxlhhyccc <45259624+zxlhhyccc@users.noreply.github.com> Date: Thu, 18 Apr 2024 23:46:57 +0800 Subject: [PATCH 3/3] luci-app-ssr-plus: fix typo and master branch cannot run issue --- luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua index 877d955408c..9c04c7436d8 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua @@ -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, } },