🎨 Sync 2025-11-23 00:10:44

This commit is contained in:
actions-user
2025-11-23 00:10:44 +08:00
parent 871cf36da2
commit 8afad5393e
4 changed files with 26 additions and 23 deletions

View File

@@ -121,7 +121,8 @@ else
{key = "response_mode", config_key = "response-mode", prefix = "-r ", default = "first-ping"},
{key = "rr_ttl", config_key = "rr-ttl", prefix = "-rr-ttl "},
{key = "rr_ttl_min", config_key = "rr-ttl-min", prefix = "-rr-ttl-min "},
{key = "rr_ttl_max", config_key = "rr-ttl-max", prefix = "-rr-ttl-max "}
{key = "rr_ttl_max", config_key = "rr-ttl-max", prefix = "-rr-ttl-max "},
{key = "rr_ttl_reply_max", config_key = "rr-ttl-reply-max", prefix = "-rr-ttl-reply-max "}
}
-- 从 custom.conf 中读取值,以最后出现的值为准
local custom_config = {}

View File

@@ -1181,19 +1181,8 @@ if is_finded("xray") then
end
o.rmempty = true
o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "raw", tls = true})
o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "raw", reality = true})
o = s:option(ListValue, "xhttp_tls_flow", translate("Flow"))
for _, v in ipairs(tls_flows) do
if v == "none" then
o.default = "none"
o:value("none", translate("none"))
else
o:value("xtls-rprx-vision", translate("xtls-rprx-vision"))
end
end
o.rmempty = true
o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "xhttp", tls = true})
o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "raw", reality = true})
o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "xhttp", reality = true})
-- [[ uTLS ]]--
@@ -1305,6 +1294,7 @@ o.rmempty = false
o:depends("tls", true)
o:depends("type", "hysteria2")
o:depends("type", "tuic")
o:depends({type = "v2ray", v2ray_protocol = "vless", reality = true})
o.description = translate("If true, allowss insecure connection at TLS client, e.g., TLS server uses unverifiable certificates.")
-- [[ Hysteria2 TLS pinSHA256 ]] --

View File

@@ -736,16 +736,17 @@ function import_ssr_url(btn, urlname, sid) {
setElementValue('cbid.shadowsocksr.' + sid + '.' + params.get("security"), true);
dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.' + params.get("security"), event);
if (params.get("allowInsecure") === "1") {
setElementValue('cbid.shadowsocksr.' + sid + '.insecure', true); // 设置 insecure 为 true
dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.insecure', event); // 触发事件
}
if (params.get("security") === "tls") {
if (params.get("ech") && params.get("ech").trim() !== "") {
setElementValue('cbid.shadowsocksr.' + sid + '.enable_ech', true); // 设置 enable_ech 为 true
dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.enable_ech', event); // 触发事件
setElementValue('cbid.shadowsocksr.' + sid + '.ech_config', params.get("ech") || "");
}
if (params.get("allowInsecure") === "1") {
setElementValue('cbid.shadowsocksr.' + sid + '.insecure', true); // 设置 insecure 为 true
dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.insecure', event); // 触发事件
}
}
if (params.get("security") === "reality") {
setElementValue('cbid.shadowsocksr.' + sid + '.reality_publickey', params.get("pbk") ? decodeURIComponent(params.get("pbk")) : "");

View File

@@ -276,12 +276,18 @@ local function processData(szType, content)
alias = alias .. remarks
result.alias = alias
elseif szType == "vmess" then
-- 去掉前后空白和#注释
-- 去掉前后空白和注释
local link = trim(content:gsub("#.*$", ""))
-- 解析正常节点
local success, info = pcall(jsonParse, link)
if not success or type(info) ~= "table" then
-- Base64 解码
local decoded = base64Decode(link)
if not decoded or decoded == "" then
return nil
end
-- 解析 JSON
local ok, info = pcall(jsonParse, decoded)
if not ok or type(info) ~= "table" then
return nil
end
@@ -318,9 +324,9 @@ local function processData(szType, content)
result.xhttp_host = info.host
result.xhttp_path = info.path
-- 检查 extra 参数是否存在且非空
if params.extra and params.extra ~= "" then
if info.extra and info.extra ~= "" then
result.enable_xhttp_extra = "1"
result.xhttp_extra = params.extra
result.xhttp_extra = info.extra
end
-- 尝试解析 JSON 数据
local success, Data = pcall(jsonParse, info.extra or "")
@@ -894,6 +900,11 @@ local function processData(szType, content)
result.tls_alpn = alpn
end
-- 处理 insecure 参数
if params.allowInsecure and params.allowInsecure ~= "" then
result.insecure = "1"
end
-- Reality 参数
if security == "reality" then
result.reality_publickey = params.pbk and UrlDecode(params.pbk) or nil