diff --git a/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm b/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm index b7f19551..468dfc95 100644 --- a/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm +++ b/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm @@ -438,10 +438,8 @@ function import_ssr_url(btn, urlname, sid) { break; case "xhttp": case "splithttp": - if (params.security !== "tls") { - setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_host', params.host ? decodeURIComponent(params.host) : ""); - } setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_mode', params.mode || "auto"); + setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_host', params.host ? decodeURIComponent(params.host) : ""); setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_path', params.path ? decodeURIComponent(params.path) : "/"); if (params.extra && params.extra.trim() !== "") { setElementValue('cbid.shadowsocksr.' + sid + '.enable_xhttp_extra', true); // 设置 enable_xhttp_extra 为 true @@ -604,8 +602,8 @@ function import_ssr_url(btn, urlname, sid) { break; case "xhttp": case "splithttp": - document.getElementsByName('cbid.shadowsocksr.' + sid + '.xhttp_host')[0].value = params.get("host") ? decodeURIComponent(params.get("host")) : ""; document.getElementsByName('cbid.shadowsocksr.' + sid + '.xhttp_mode')[0].value = params.get("mode") || "auto"; + document.getElementsByName('cbid.shadowsocksr.' + sid + '.xhttp_host')[0].value = params.get("host") ? decodeURIComponent(params.get("host")) : ""; document.getElementsByName('cbid.shadowsocksr.' + sid + '.xhttp_path')[0].value = params.get("path") ? decodeURIComponent(params.get("path")) : "/"; if (params.get("extra") && params.get("extra").trim() !== "") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.enable_xhttp_extra')[0].checked = true; // 设置 enable_xhttp_extra 为 true @@ -842,10 +840,8 @@ function import_ssr_url(btn, urlname, sid) { break; case "xhttp": case "splithttp": - if (params.get("security") !== "tls") { - setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_host', params.get("host") ? decodeURIComponent(params.get("host")) : ""); - } setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_mode', params.get("mode") || "auto"); + setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_host', params.get("host") ? decodeURIComponent(params.get("host")) : ""); setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_path', params.get("path") ? decodeURIComponent(params.get("path")) : "/"); if (params.get("extra") && params.get("extra").trim() !== "") { setElementValue('cbid.shadowsocksr.' + sid + '.enable_xhttp_extra', true); // 设置 enable_xhttp_extra 为 true 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 6f9f43e2..9440abcb 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua @@ -691,8 +691,8 @@ local function processData(szType, content) result.httpupgrade_host = (result.tls ~= "1") and (params.host and UrlDecode(params.host)) or nil result.httpupgrade_path = params.path and UrlDecode(params.path) or "/" elseif result.transport == "xhttp" or result.transport == "splithttp" then - result.xhttp_host = (result.tls ~= "1") and (params.host and UrlDecode(params.host)) or nil result.xhttp_mode = params.mode or "auto" + result.xhttp_host = params.host and UrlDecode(params.host) or nil result.xhttp_path = params.path and UrlDecode(params.path) or "/" -- 检查 extra 参数是否存在且非空 if params.extra and params.extra ~= "" then @@ -884,8 +884,8 @@ local function processData(szType, content) result.httpupgrade_host = (result.tls ~= "1") and (params.host and UrlDecode(params.host)) or nil result.httpupgrade_path = params.path and UrlDecode(params.path) or "/" elseif result.transport == "xhttp" or result.transport == "splithttp" then - result.xhttp_host = (result.tls ~= "1") and (params.host and UrlDecode(params.host)) or nil result.xhttp_mode = params.mode or "auto" + result.xhttp_host = params.host and UrlDecode(params.host) or nil result.xhttp_path = params.path and UrlDecode(params.path) or "/" -- 检查 extra 参数是否存在且非空 if params.extra and params.extra ~= "" then @@ -1023,8 +1023,8 @@ local function processData(szType, content) result.httpupgrade_path = params.path and UrlDecode(params.path) or "/" elseif result.transport == "xhttp" then - result.xhttp_host = (result.tls ~= "1" and result.reality ~= "1") and (params.host and UrlDecode(params.host)) or nil result.xhttp_mode = params.mode or "auto" + result.xhttp_host = params.host and UrlDecode(params.host) or nil result.xhttp_path = params.path and UrlDecode(params.path) or "/" if params.extra and params.extra ~= "" then result.enable_xhttp_extra = "1"