diff --git a/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua b/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua index b41c692..24a4931 100644 --- a/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua +++ b/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua @@ -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 = {} diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index c0e625b..54fd709 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -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 ]] -- diff --git a/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm b/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm index 8e0f80d..93b0e70 100644 --- a/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm +++ b/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm @@ -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")) : ""); diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua index dfa58b9..cf7c84d 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua @@ -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