update 2026-10-17 16:12:15

This commit is contained in:
action committed 2026-10-17 16:12:15 +08:00
1 parent fbf8d8b632
commit 63dbfd1d1b
167 files changed
+407 -38039

No files matched your search

@@ -0,0 +1,37 @@
#!/bin/sh
CONFIG=passwall2
dir="$1"
status="$2"
manager="$3"
force="$4"
[ "$manager" = apk ] && extension=apk || extension=ipk
set -- "$dir/luci-app-${CONFIG}.${extension}"
for package in "$dir"/luci-i18n-${CONFIG}-*.${extension}; do
[ -f "$package" ] && set -- "$@" "$package"
done
if [ "$manager" = apk ]; then
extra=""
[ "$force" = 1 ] && extra="--force-reinstall --force-overwrite"
apk add --allow-untrusted $extra "$@"
result=$?
else
extra=""
[ "$force" = 1 ] && extra="--force-reinstall"
opkg install $extra "$@"
result=$?
fi
rm -rf "$dir"
if [ "$result" = 0 ]; then
rm -f "/tmp/etc/${CONFIG}_tmp/${CONFIG}_version" /tmp/luci-indexcache /tmp/luci-indexcache.*
if [ -x /etc/init.d/rpcd ]; then
/etc/init.d/rpcd restart >/dev/null 2>&1
fi
if [ -x /etc/init.d/uhttpd ]; then
/etc/init.d/uhttpd reload >/dev/null 2>&1
fi
fi
[ "$result" = 0 ] && echo '{"code":0}' > "$status" || echo '{"code":1}' > "$status"
(sleep 60; rm -f "$status") >/dev/null 2>&1 &
@@ -2141,7 +2141,7 @@ local function curl(url, file, ua, mode, hwid)
"-fskL", "-w %{http_code}", "--retry 3", "--connect-timeout 3", "-H 'Accept: */*'", "-H 'Accept-Encoding: identity'"
}
if ua and ua ~= "" and ua ~= "curl" then
ua = (ua == "passwall2") and ("passwall2/" .. api.get_version()) or ua
ua = (ua == "passwall2") and ("passwall2/" .. (api.get_version():match("^([^-]+)") or "")) or ua
curl_args[#curl_args + 1] = '--user-agent "' .. ua .. '"'
end
if hwid == "1" then