diff --git a/frontend/src/models/inbound.js b/frontend/src/models/inbound.js index b2201d6f..29b0057a 100644 --- a/frontend/src/models/inbound.js +++ b/frontend/src/models/inbound.js @@ -1595,6 +1595,10 @@ export class Inbound extends XrayCommonClass { }); } + if (typeof xhttp.mode === 'string' && xhttp.mode.length > 0) { + extra.mode = xhttp.mode; + } + const stringFields = [ "sessionPlacement", "sessionKey", "seqPlacement", "seqKey", diff --git a/sub/subJsonService.go b/sub/subJsonService.go index 4fe77b88..3b34ed68 100644 --- a/sub/subJsonService.go +++ b/sub/subJsonService.go @@ -265,6 +265,14 @@ func (s *SubJsonService) streamData(stream string) map[string]any { streamSettings["wsSettings"] = s.removeAcceptProxy(streamSettings["wsSettings"]) case "httpupgrade": streamSettings["httpupgradeSettings"] = s.removeAcceptProxy(streamSettings["httpupgradeSettings"]) + case "xhttp": + streamSettings["xhttpSettings"] = s.removeAcceptProxy(streamSettings["xhttpSettings"]) + if xhttp, ok := streamSettings["xhttpSettings"].(map[string]any); ok { + delete(xhttp, "noSSEHeader") + delete(xhttp, "scMaxBufferedPosts") + delete(xhttp, "scStreamUpServerSecs") + delete(xhttp, "serverMaxHeaderBytes") + } } return streamSettings } diff --git a/sub/subService.go b/sub/subService.go index 4679165c..d769bf5a 100644 --- a/sub/subService.go +++ b/sub/subService.go @@ -1025,6 +1025,10 @@ func buildXhttpExtra(xhttp map[string]any) map[string]any { } } + if mode, ok := xhttp["mode"].(string); ok && len(mode) > 0 { + extra["mode"] = mode + } + stringFields := []string{ "sessionPlacement", "sessionKey", "seqPlacement", "seqKey",