From 6708a1d2e84afed1891cd246066218491f69d18d Mon Sep 17 00:00:00 2001 From: kiddin9 <48883331+kiddin9@users.noreply.github.com> Date: Thu, 4 Jun 2026 22:13:29 +0800 Subject: [PATCH] Update ssr-plus.patch --- .github/diy/patches/ssr-plus.patch | 50 ++++++++++++++++-------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/.github/diy/patches/ssr-plus.patch b/.github/diy/patches/ssr-plus.patch index e4a8a28be..49a39a391 100644 --- a/.github/diy/patches/ssr-plus.patch +++ b/.github/diy/patches/ssr-plus.patch @@ -1,6 +1,6 @@ --- a/luci-app-ssr-plus/Makefile +++ b/luci-app-ssr-plus/Makefile -@@ -118,7 +118,7 @@ endchoice +@@ -99,7 +99,7 @@ endchoice choice prompt "V2ray-core Selection" @@ -9,27 +9,16 @@ default PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY config PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY -@@ -169,7 +169,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_DNSPROXY - - config PACKAGE_$(PKG_NAME)_INCLUDE_MosDNS - bool "Include MosDNS" -- default y if aarch64||arm||i386||x86_64 -+ default y if aarch64||i386||x86_64 - - config PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria - bool "Include Hysteria" --- a/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua +++ b/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua -@@ -76,10 +76,66 @@ function index() - entry({"admin", "services", "shadowsocksr", "remove_node"}, call("act_remove")) - entry({"admin", "services", "shadowsocksr", "save_node_order"}, call("act_save_order")).leaf = true - entry({"admin", "services", "shadowsocksr", "get_now_use_node"}, call("act_get_now_use_node")).leaf = true -+ entry({'admin', 'services', "shadowsocksr", 'ip'}, call('check_ip')) -- 获取ip情况 +@@ -663,6 +663,62 @@ function index() + entry({"admin", "services", "shadowsocksr", "clash_client_rule_clear"}, call("clash_client_rule_clear")).leaf = true --[[Backup]] entry({"admin", "services", "shadowsocksr", "backup"}, call("create_backup")).leaf = true - end - ++ entry({'admin', 'services', "shadowsocksr", 'ip'}, call('check_ip')) -- 获取ip情况 ++end ++ +function check_site(host, port) + local nixio = require "nixio" + local socket = nixio.socket("inet", "stream") @@ -83,19 +72,21 @@ + e.youtube = check_site('www.youtube.com', port) + luci.http.prepare_content('application/json') + luci.http.write_json(e) -+end -+ + end + function subscribe() - luci.sys.call("/usr/bin/lua /usr/share/shadowsocksr/subscribe.lua >>/var/log/ssrplus.log") - luci.http.prepare_content("application/json") --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua -@@ -293,4 +293,5 @@ if is_finded("chinadns-ng") then +@@ -227,7 +227,7 @@ if is_finded("chinadns-ng") then end end -+m:section(SimpleSection).template = "shadowsocksr/status_bottom" +-local dns_defaults_section = m:section(SimpleSection) +-dns_defaults_section.template = "shadowsocksr/client_dns_defaults" ++m:append(Template("shadowsocksr/client_dns_defaults")) ++m:append(Template("shadowsocksr/status_bottom")) + return m new file mode 100644 @@ -234,6 +225,19 @@ index 000000000000..a00fff9c79b3 --- a/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus +++ b/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus +@@ -29,6 +29,12 @@ touch /etc/ssrplus/ad.conf + touch /etc/config/shadowsocksr + + if [ -s "/etc/config/shadowsocksr" ]; then ++ if ! uci -q get shadowsocksr.@server_subscribe_item[0] > /dev/null; then ++ sid_output="$(uci add shadowsocksr server_subscribe_item)" ++ uci -q set shadowsocksr.$sid_output.enabled=1 ++ uci -q set shadowsocksr.$sid_output.alias="Subscribe default" ++ fi ++ + if uci -q get shadowsocksr.@server_subscribe[0].auto_update_time > /dev/null; then + uci -q delete shadowsocksr.@server_subscribe[0].auto_update_time + fi @@ -43,5 +43,8 @@ if [ -s "/etc/uwsgi/vassals/luci-webui.ini" ];then /etc/init.d/uwsgi restart fi