diff --git a/.github/diy/patches/ssr-plus.patch b/.github/diy/patches/ssr-plus.patch index 44d7f45b..0752c5de 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