🎨 Sync 2025-11-23 00:10:44
This commit is contained in:
@@ -121,7 +121,8 @@ else
|
|||||||
{key = "response_mode", config_key = "response-mode", prefix = "-r ", default = "first-ping"},
|
{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", config_key = "rr-ttl", prefix = "-rr-ttl "},
|
||||||
{key = "rr_ttl_min", config_key = "rr-ttl-min", prefix = "-rr-ttl-min "},
|
{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 中读取值,以最后出现的值为准
|
-- 从 custom.conf 中读取值,以最后出现的值为准
|
||||||
local custom_config = {}
|
local custom_config = {}
|
||||||
|
|||||||
@@ -1181,19 +1181,8 @@ if is_finded("xray") then
|
|||||||
end
|
end
|
||||||
o.rmempty = true
|
o.rmempty = true
|
||||||
o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "raw", tls = 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 = "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})
|
o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "xhttp", reality = true})
|
||||||
|
|
||||||
-- [[ uTLS ]]--
|
-- [[ uTLS ]]--
|
||||||
@@ -1305,6 +1294,7 @@ o.rmempty = false
|
|||||||
o:depends("tls", true)
|
o:depends("tls", true)
|
||||||
o:depends("type", "hysteria2")
|
o:depends("type", "hysteria2")
|
||||||
o:depends("type", "tuic")
|
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.")
|
o.description = translate("If true, allowss insecure connection at TLS client, e.g., TLS server uses unverifiable certificates.")
|
||||||
|
|
||||||
-- [[ Hysteria2 TLS pinSHA256 ]] --
|
-- [[ Hysteria2 TLS pinSHA256 ]] --
|
||||||
|
|||||||
@@ -736,16 +736,17 @@ function import_ssr_url(btn, urlname, sid) {
|
|||||||
setElementValue('cbid.shadowsocksr.' + sid + '.' + params.get("security"), true);
|
setElementValue('cbid.shadowsocksr.' + sid + '.' + params.get("security"), true);
|
||||||
dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.' + params.get("security"), event);
|
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("security") === "tls") {
|
||||||
if (params.get("ech") && params.get("ech").trim() !== "") {
|
if (params.get("ech") && params.get("ech").trim() !== "") {
|
||||||
setElementValue('cbid.shadowsocksr.' + sid + '.enable_ech', true); // 设置 enable_ech 为 true
|
setElementValue('cbid.shadowsocksr.' + sid + '.enable_ech', true); // 设置 enable_ech 为 true
|
||||||
dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.enable_ech', event); // 触发事件
|
dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.enable_ech', event); // 触发事件
|
||||||
setElementValue('cbid.shadowsocksr.' + sid + '.ech_config', params.get("ech") || "");
|
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") {
|
if (params.get("security") === "reality") {
|
||||||
setElementValue('cbid.shadowsocksr.' + sid + '.reality_publickey', params.get("pbk") ? decodeURIComponent(params.get("pbk")) : "");
|
setElementValue('cbid.shadowsocksr.' + sid + '.reality_publickey', params.get("pbk") ? decodeURIComponent(params.get("pbk")) : "");
|
||||||
|
|||||||
@@ -276,12 +276,18 @@ local function processData(szType, content)
|
|||||||
alias = alias .. remarks
|
alias = alias .. remarks
|
||||||
result.alias = alias
|
result.alias = alias
|
||||||
elseif szType == "vmess" then
|
elseif szType == "vmess" then
|
||||||
-- 去掉前后空白和#注释
|
-- 去掉前后空白和注释
|
||||||
local link = trim(content:gsub("#.*$", ""))
|
local link = trim(content:gsub("#.*$", ""))
|
||||||
|
|
||||||
-- 解析正常节点
|
-- Base64 解码
|
||||||
local success, info = pcall(jsonParse, link)
|
local decoded = base64Decode(link)
|
||||||
if not success or type(info) ~= "table" then
|
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
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -318,9 +324,9 @@ local function processData(szType, content)
|
|||||||
result.xhttp_host = info.host
|
result.xhttp_host = info.host
|
||||||
result.xhttp_path = info.path
|
result.xhttp_path = info.path
|
||||||
-- 检查 extra 参数是否存在且非空
|
-- 检查 extra 参数是否存在且非空
|
||||||
if params.extra and params.extra ~= "" then
|
if info.extra and info.extra ~= "" then
|
||||||
result.enable_xhttp_extra = "1"
|
result.enable_xhttp_extra = "1"
|
||||||
result.xhttp_extra = params.extra
|
result.xhttp_extra = info.extra
|
||||||
end
|
end
|
||||||
-- 尝试解析 JSON 数据
|
-- 尝试解析 JSON 数据
|
||||||
local success, Data = pcall(jsonParse, info.extra or "")
|
local success, Data = pcall(jsonParse, info.extra or "")
|
||||||
@@ -894,6 +900,11 @@ local function processData(szType, content)
|
|||||||
result.tls_alpn = alpn
|
result.tls_alpn = alpn
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 处理 insecure 参数
|
||||||
|
if params.allowInsecure and params.allowInsecure ~= "" then
|
||||||
|
result.insecure = "1"
|
||||||
|
end
|
||||||
|
|
||||||
-- Reality 参数
|
-- Reality 参数
|
||||||
if security == "reality" then
|
if security == "reality" then
|
||||||
result.reality_publickey = params.pbk and UrlDecode(params.pbk) or nil
|
result.reality_publickey = params.pbk and UrlDecode(params.pbk) or nil
|
||||||
|
|||||||
Reference in New Issue
Block a user