Fix Host ignored in v2ray websocket transport

This commit is contained in:
世界
2023-11-05 23:23:49 +08:00
parent bb928f096a
commit aaa6702863
3 changed files with 11 additions and 5 deletions

View File

@@ -81,7 +81,7 @@ func NewClient(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, opt
uri.Path = options.Path
err := sHTTP.URLSetPath(&uri, options.Path)
if err != nil {
return nil, E.New("failed to set path: " + err.Error())
return nil, E.Cause(err, "parse path")
}
client.url = &uri
return client, nil