Migrate to gobwas/ws

This commit is contained in:
世界
2023-11-09 16:59:44 +08:00
parent 40a0b69918
commit 4d23773a25
13 changed files with 192 additions and 161 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