From b752d1c41ac599545d84f2bf845ba45f03d657c9 Mon Sep 17 00:00:00 2001 From: gitea-action Date: Fri, 23 May 2025 13:30:21 +0800 Subject: [PATCH] luci-app-ssr-plus: sync upstream last commit: https://github.com/fw876/helloworld/commit/7cc59287f891b0e41fc38a0a76b9244e557f30d7 --- luci-app-ssr-plus/Makefile | 2 +- luci-app-ssr-plus/root/etc/init.d/shadowsocksr | 2 +- .../root/usr/share/shadowsocksr/subscribe.lua | 8 ++++---- luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua | 2 +- patch-luci-app-ssr-plus.patch | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/luci-app-ssr-plus/Makefile b/luci-app-ssr-plus/Makefile index ce23c1464..0d1470db6 100644 --- a/luci-app-ssr-plus/Makefile +++ b/luci-app-ssr-plus/Makefile @@ -39,7 +39,7 @@ LUCI_PKGARCH:=all LUCI_DEPENDS:= \ +coreutils +coreutils-base64 +dns2tcp +dnsmasq-full +@PACKAGE_dnsmasq_full_ipset +ipset +kmod-ipt-nat +jq \ +ip-full +iptables +iptables-mod-tproxy +lua +lua-neturl +libuci-lua +microsocks \ - +tcping +resolveip +shadowsocksr-libev-ssr-check +wget-ssl \ + +tcping +resolveip +shadowsocksr-libev-ssr-check +curl \ +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:curl \ +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:v2ray-core \ +PACKAGE_$(PKG_NAME)_INCLUDE_Xray:curl \ diff --git a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index f08663634..b81d0af21 100755 --- a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -95,7 +95,7 @@ get_host_ip() { if [ -z "$(echo $host | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}")" ]; then if [ "$host" == "${host#*:[0-9a-fA-F]}" ]; then ip=$(resolveip -4 -t 3 $host | awk 'NR==1{print}') - [ -z "$ip" ] && ip=$(wget -q -O- http://119.29.29.29/d?dn=$host | awk -F ';' '{print $1}') + [ -z "$ip" ] && ip=$(curl -sSL "http://119.29.29.29/d?dn=$host" | awk -F ';' '{print $1}') fi fi [ -z "$ip" ] || uci_set_by_name $1 ip $ip diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua index e6ac183d2..26415f690 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua @@ -680,12 +680,12 @@ local function processData(szType, content) result.switch_enable = switch_enable return result end --- wget -local function wget(url) +-- curl +local function curl(url) -- 清理URL中的隐藏字符 url = url:gsub("%s+$", ""):gsub("^%s+", ""):gsub("%z", "") - local stdout = luci.sys.exec('wget-ssl --timeout=20 --tries=3 -q --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36" --no-check-certificate -O- "' .. url .. '"') + local stdout = luci.sys.exec('curl -sSL --connect-timeout 20 --max-time 30 --retry 3 -A "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36" --insecure --location "' .. url .. '"') return trim(stdout) end @@ -739,7 +739,7 @@ local execute = function() luci.sys.init.stop(name) end for k, url in ipairs(subscribe_url) do - local raw = wget(url) + local raw = curl(url) if #raw > 0 then local nodes, szType local groupHash = md5(url) diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua index 680033ab3..65e98a7cc 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/update.lua @@ -150,7 +150,7 @@ end local function update(url, file, type, file2) local Num = 1 - local refresh_cmd = "wget --no-check-certificate -q -O /tmp/ssr-update." .. type .. " " .. url + local refresh_cmd = "curl -sSL --insecure -o /tmp/ssr-update." .. type .. " " .. url local sret = luci.sys.call(refresh_cmd) if sret == 0 then if type == "gfw_data" then diff --git a/patch-luci-app-ssr-plus.patch b/patch-luci-app-ssr-plus.patch index 7c0f77669..bf932aa8c 100644 --- a/patch-luci-app-ssr-plus.patch +++ b/patch-luci-app-ssr-plus.patch @@ -1,5 +1,5 @@ diff --git a/luci-app-ssr-plus/Makefile b/luci-app-ssr-plus/Makefile -index 697d594..ce23c14 100644 +index 28753af..0d1470d 100644 --- a/luci-app-ssr-plus/Makefile +++ b/luci-app-ssr-plus/Makefile @@ -29,6 +29,7 @@ PKG_CONFIG_DEPENDS:= \ @@ -237,7 +237,7 @@ index cf4ca1f..04f2896 100644 } } diff --git a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr -index 22b6c7c..f086636 100755 +index 58f1976..b81d0af 100755 --- a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -1287,8 +1287,18 @@ start_server() {