fix: correct type for vmess.ws-opts.path in ConvertsV2Ray

It should be a string for the following reasons:
1. During conversion, it is conditionally assigned with
   `wsOpts["path"] = path.(string)`
2. After conversion, it is decoded into `WSOptions.Path` in
   `adapter/outbound/vmess.go` which requires a string.
This commit is contained in:
moexiami 2024-03-29 19:09:38 +07:59
parent 72d0948224
commit d3ab919655
No known key found for this signature in database
GPG key ID: 53E2BDD8BD17882C

View file

@ -333,7 +333,7 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) {
case "ws":
headers := make(map[string]any)
wsOpts := make(map[string]any)
wsOpts["path"] = []string{"/"}
wsOpts["path"] = "/"
if host, ok := values["host"]; ok && host != "" {
headers["Host"] = host.(string)
}