| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| 2.16.2 - Fix WebSocket proxy URL construction and missing configuration parameter source code.tar.gz | 2026-04-03 | 21.6 kB | |
| 2.16.2 - Fix WebSocket proxy URL construction and missing configuration parameter source code.zip | 2026-04-03 | 32.4 kB | |
| README.md | 2026-04-03 | 1.4 kB | |
| Totals: 3 Items | 55.4 kB | 3 | |
What's Changed
Fix WebSocket proxy URL construction and missing configuration parameter by @Weixi779 in [#160]
Background
I noticed issue [#147] regarding the incorrect WebSocket proxy URL construction. I also saw a similar solution proposed in PR [#149] by @GEverding, which correctly identified the root cause of the problem.
However, PR [#149] received a change request from @0xTim asking for tests to verify the proxy URI generation. Since that PR has not been updated, I have created this PR with the complete fix including the requested test modifications.
Changes
1. Fix proxy URL construction order - Fixes [#147]
- Changed URL format from
ws://host/path:porttows://host:port/path- Updated test assertion in
testProxyto expect the correct URL format- Credit to @GEverding for identifying this issue in PR [#149]
2. Add missing configuration parameter
- Pass
configurationparameter when connecting through proxy- Ensures client configuration is properly forwarded to the underlying connection
3. Use correct URI form for wss + proxy connections
- For
wsswith proxy: use origin-form (/path) after CONNECT tunnel per RFC 7230 …
Reviewers
Thanks to the reviewers for their help:
- @ptoffy
This patch was released by @0xTim
Full Changelog: https://github.com/vapor/websocket-kit/compare/2.16.1...2.16.2