Download Latest Version 2.16.2 - Fix WebSocket proxy URL construction and missing configuration parameter source code.tar.gz (21.6 kB)
Email in envelope

Get an email when there's a new version of WebSocket Kit

Home / 2.16.2
Name Modified Size InfoDownloads / 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:port to ws://host:port/path
  • Updated test assertion in testProxy to expect the correct URL format
  • Credit to @GEverding for identifying this issue in PR [#149]

2. Add missing configuration parameter

  • Pass configuration parameter when connecting through proxy
  • Ensures client configuration is properly forwarded to the underlying connection

3. Use correct URI form for wss + proxy connections

  • For wss with 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

Source: README.md, updated 2026-04-03