mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-16 21:09:44 +03:00
Fix xhttp options
This commit is contained in:
@@ -161,6 +161,10 @@ const (
|
|||||||
PlacementBody = "body"
|
PlacementBody = "body"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func (c V2RayXHTTPOptions) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal((*_V2RayXHTTPOptions)(&c))
|
||||||
|
}
|
||||||
|
|
||||||
func (c *V2RayXHTTPOptions) UnmarshalJSON(bytes []byte) error {
|
func (c *V2RayXHTTPOptions) UnmarshalJSON(bytes []byte) error {
|
||||||
err := json.Unmarshal(bytes, (*_V2RayXHTTPOptions)(c))
|
err := json.Unmarshal(bytes, (*_V2RayXHTTPOptions)(c))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -244,7 +248,8 @@ func checkV2RayXHTTPBaseOptions(mode string, options *V2RayXHTTPBaseOptions) err
|
|||||||
switch options.SeqPlacement {
|
switch options.SeqPlacement {
|
||||||
case "":
|
case "":
|
||||||
options.SeqPlacement = "path"
|
options.SeqPlacement = "path"
|
||||||
case "path", "cookie", "header", "query":
|
case "path":
|
||||||
|
case "cookie", "header", "query":
|
||||||
if options.SessionPlacement == "path" {
|
if options.SessionPlacement == "path" {
|
||||||
return E.New("SeqPlacement must be path when SessionPlacement is path")
|
return E.New("SeqPlacement must be path when SessionPlacement is path")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user