🍉 Sync 2026-04-26 08:32:50

This commit is contained in:
github-actions[bot] committed 2026-04-26 08:32:50 +08:00
1 parent 661e88ac62
commit 7ea7ead99c
14 files changed
+419 -418

No files matched your search

@@ -1633,9 +1633,9 @@ local function processData(szType, content, add_mode, group, sub_cfg)
end
local function curl(url, file, ua, mode)
if not url or url == "" then return 404 end
if not url or url == "" then return 22, 404 end
local curl_args = {
"-skL", "-w %{http_code}", "--retry 3", "--connect-timeout 3", "-H 'Accept-Encoding: identity'"
"-fskL", "-w %{http_code}", "--retry 3", "--connect-timeout 3", "-H 'Accept-Encoding: identity'"
}
if ua and ua ~= "" and ua ~= "curl" then
ua = (ua == "passwall") and ("passwall/" .. api.get_version()) or ua
@@ -1650,7 +1650,7 @@ local function curl(url, file, ua, mode)
else
return_code, result = api.curl_logic(url, file, curl_args)
end
return tonumber(result)
return return_code, tonumber(result)
end
function get_headers()
@@ -2134,8 +2134,9 @@ local execute = function()
local result = (not access_mode) and "自动" or (access_mode == "direct" and "直连" or (access_mode == "proxy" and "代理" or "自动"))
log('正在订阅:【' .. remark .. '】' .. url .. ' [' .. result .. ']')
tmp_file = "/tmp/" .. cfgid
value.http_code = curl(url, tmp_file, ua, access_mode)
if value.http_code ~= 200 then
local return_code
return_code, value.http_code = curl(url, tmp_file, ua, access_mode)
if return_code ~= 0 then
fail_list[#fail_list + 1] = value
luci.sys.call("rm -f " .. tmp_file)
end