⛅ Sync 2026-10-07 23:59:28

This commit is contained in:
github-actions[bot] committed 2026-10-07 23:59:28 +08:00
1 parent 26ea6d17f5
commit 5a632575da
108 files changed
+420 -455

No files matched your search

@@ -1273,7 +1273,23 @@ local function processData(szType, content, cfgid)
end
if xray_ss_mode then
local url = URL.parse("http://" .. info)
local userinfo, host_port = (find_index or ""):match("^(.*)@([^@]+)$")
local credentials
if userinfo then
-- SIP002 userinfo or a plain method:password; preserve literal '+'.
userinfo = userinfo:gsub("%%(%x%x)", get_urldecode)
credentials = userinfo:find(":", 1, true) and userinfo or base64Decode(userinfo)
else
-- Legacy links encode the entire method:password@host:port.
credentials, host_port = base64Decode(find_index):match("^(.*)@([^@]+)$")
if not credentials or not credentials:find(":", 1, true) then
return nil
end
end
local url = URL.parse("http://" .. host_port .. (query ~= "" and ("?" .. query) or ""))
if not url.host or not url.port then
return nil
end
local params = url.query
result.type = "v2ray"
@@ -1281,14 +1297,14 @@ local function processData(szType, content, cfgid)
result.server = normalize_host(url.host)
result.server_port = url.port
-- 判断 @ 前部分是否为 Base64
local is_base64 = base64Decode(UrlDecode(url.user))
if is_base64:find(":") then
-- 新格式:method:password
result.encrypt_method_ss, result.password = is_base64:match("^(.-):(.*)$")
if credentials:find(":", 1, true) then
result.encrypt_method_ss, result.password = credentials:match("^([^:]+):(.*)$")
if not result.encrypt_method_ss then
return nil
end
else
-- 旧格式:UUID 直接作为密码
result.password = url.user
result.password = userinfo
result.encrypt_method_ss = params.encryption or "none"
end