luci-app-ssr-plus: sync upstream

last commit: 7cc59287f8
This commit is contained in:
gitea-action 2025-05-23 13:30:21 +08:00
parent 28550d9d44
commit b752d1c41a
5 changed files with 9 additions and 9 deletions

View File

@ -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 \

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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() {