From 5610a2d4c35b60dacb51a1ed5b0ad8acaa7b19d0 Mon Sep 17 00:00:00 2001 From: Shtorm <108103062+shtorm-7@users.noreply.github.com> Date: Sun, 22 Feb 2026 15:46:12 +0300 Subject: [PATCH] Fix xhttp options --- option/v2ray_transport.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/option/v2ray_transport.go b/option/v2ray_transport.go index d4ed9341..308d5602 100644 --- a/option/v2ray_transport.go +++ b/option/v2ray_transport.go @@ -161,6 +161,10 @@ const ( PlacementBody = "body" ) +func (c V2RayXHTTPOptions) MarshalJSON() ([]byte, error) { + return json.Marshal((*_V2RayXHTTPOptions)(&c)) +} + func (c *V2RayXHTTPOptions) UnmarshalJSON(bytes []byte) error { err := json.Unmarshal(bytes, (*_V2RayXHTTPOptions)(c)) if err != nil { @@ -244,7 +248,8 @@ func checkV2RayXHTTPBaseOptions(mode string, options *V2RayXHTTPBaseOptions) err switch options.SeqPlacement { case "": options.SeqPlacement = "path" - case "path", "cookie", "header", "query": + case "path": + case "cookie", "header", "query": if options.SessionPlacement == "path" { return E.New("SeqPlacement must be path when SessionPlacement is path") }