luci: add Xray VLESS share link fp

This commit is contained in:
xiaorouji 2023-02-04 16:39:36 +08:00 committed by sbwml
parent 28d52193ac
commit ca32b91815
2 changed files with 15 additions and 8 deletions

View File

@ -288,12 +288,15 @@ local has_xray = api.is_finded("xray")
if (opt.get("tls").checked) {
var v_security = "tls";
var v_flow = null;
params += "&security=" + v_security;
if (opt.get("tlsflow").value) {
v_flow = opt.get("tlsflow").value;
let v_flow = opt.get("tlsflow").value;
params += "&flow=" + v_flow;
}
if (opt.get("xray_fingerprint").value && opt.get("xray_fingerprint").value != "") {
let v_fp = opt.get("xray_fingerprint").value
params += "&fp=" + v_fp;
}
params += opt.query("sni", "tls_serverName");
}
@ -857,6 +860,9 @@ local has_xray = api.is_finded("xray")
if (queryParam.allowinsecure === '0') {
opt.set('tls_allowInsecure', false);
}
if (queryParam.fp && queryParam.fp.trim() != "") {
opt.set('xray_fingerprint', queryParam.fp);
}
}
}

View File

@ -775,6 +775,7 @@ local function processData(szType, content, add_mode, add_from)
result.tls = "1"
result.tlsflow = params.flow or nil
result.tls_serverName = (params.sni and params.sni ~= "") and params.sni or params.host
result.fingerprint = (params.fp and params.fp ~= "") and params.fp or nil
end
result.port = port