mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 07:03:23 +08:00
fix: correct type for vmess.ws-opts.path in ConvertsV2Ray (#1145)
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:
parent
ac2506154f
commit
5eb8958ff2
@ -333,7 +333,7 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) {
|
||||
case "ws", "httpupgrade":
|
||||
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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user