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:
MHSanaei
2026-06-20 11:02:57 +02:00
parent 6d9fd4b41b
commit 0a40ec5f13
3 changed files with 12 additions and 2 deletions
+4
View File
@@ -1657,6 +1657,10 @@ func buildXhttpExtra(xhttp map[string]any) map[string]any {
}
extra := map[string]any{}
if mode, ok := xhttp["mode"].(string); ok && len(mode) > 0 {
extra["mode"] = mode
}
if xpb, ok := xhttp["xPaddingBytes"].(string); ok && len(xpb) > 0 {
extra["xPaddingBytes"] = xpb
}