mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-20 01:50:58 +00:00
fix(sub): re-add xhttp mode to extra JSON for Karing (#5446)
Regression of #4364. Karing parses the `extra` JSON and ignores the flat `mode=` param, so when extra was present without `mode` it stored the transport with no mode and the handshake failed. The `mode` field that #4365 added to buildXhttpExtra was dropped during the share-link refactor; restore it in both the backend and frontend generators.
This commit is contained in:
@@ -47,6 +47,10 @@ function buildXhttpExtra(xhttp: XHttpStreamSettings | undefined): Record<string,
|
||||
if (!xhttp) return null;
|
||||
const extra: Record<string, unknown> = {};
|
||||
|
||||
if (typeof xhttp.mode === 'string' && xhttp.mode.length > 0) {
|
||||
extra.mode = xhttp.mode;
|
||||
}
|
||||
|
||||
if (typeof xhttp.xPaddingBytes === 'string' && xhttp.xPaddingBytes.length > 0) {
|
||||
extra.xPaddingBytes = xhttp.xPaddingBytes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user