mirror of
https://github.com/fw876/helloworld.git
synced 2026-12-05 08:01:07 +00:00
luci-app-ssr-plus: Fix Xray xhttp proto import and subscribe.
This commit is contained in:
1 parent
bb7256761c
commit
aa3fd5ded1
2 files changed
+6
-10
No files matched your search
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user