🐛 Fix null pointer exception when parse ws headers in vless

🔧 Update templates
This commit is contained in:
2024-04-22 23:44:04 +08:00
parent a2596b1880
commit acf547f173
7 changed files with 46 additions and 533 deletions

View File

@@ -130,7 +130,12 @@ func ParseVless(proxy string) (model.Outbound, error) {
Path: path,
},
}
result.VLESSOptions.Transport.WebsocketOptions.Headers["Host"] = host
if host != "" {
if result.VLESSOptions.Transport.WebsocketOptions.Headers == nil {
result.VLESSOptions.Transport.WebsocketOptions.Headers = make(map[string]string)
}
result.VLESSOptions.Transport.WebsocketOptions.Headers["Host"] = host
}
}
if params.Get("type") == "quic" {