WebSocket Dial Handshake 403 When Connecting to Server Written Using x/net/websocket
- 主要语言
- Go
- 星标
- 5.5k
- 派生
- 372
- PR 合并指标
- 30 天内没有已合并 PR
描述
We have a simplistic example websocket server written using this boilerplate in the labstack echo cookbook: https://echo.labstack.com/docs/cookbook/websocket#server
It's currently using `x/net/websocket`. On the client side that connects to this example server, I tried to swap out our `x/net/websocket` implementation for `nhooyr/websocket`, but when `websocket.Dial` is called, the handshake fails with this 403 error. I'm not sure why this is, as the default CORS for `echo` is to allow everything and if I swap back to the dialer in `x/net/websocket`, it works fine. Just in case, I've tried to provide a custom HTTP client with a custom transport that sets `InsecureSkipVerify: true` via the `DialOptions`, but this also did not work.
贡献指南
这个仓库没有索引到贡献指南
调研方向
Start at websocket.Dial and reproduce the 403 handshake against the Echo cookbook server, using the linked server example as the test case. Compare the failing client request with the working x/net/websocket connection and the reported custom DialOptions transport; done means the client completes the handshake with that server.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- go
- 领域
- networking
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100