µWebSockets v20.79.0 Release Notes
Release Date: 2026-07-06 // 4 months ago-
⬆️ Async upgrade in cork
⬆️ @aPoCoMiLogin and @MeredithRodneyMcKay submitted a fix for the buggy case of upgrading a HttpSocket into WebSocket inside cork() callback from inside an "async" callback (such as a timer or anything non-uWS).
↪ People had reported various workarounds for this bug - those are no longer necessary.
beginWrite
@notaphplover has added beginWrite() for when you need to establish Transfer-Encoding: Chunked writing path before you know what to write. Calling beginWrite() locks you into the write() chunked writing path immediately.
Previous changes from v20.78.0
-
PROXY v2 fix for L4 use cases
UWS_WITH_PROXY has been working fine for L7 proxy (HTTP level) use cases, but has been broken for L4 proxy use cases (TCP level):
If you deploy uWS compiled with UWS_WITH_PROXY behind a L4 proxy that sends PROXY v2 frames, and your app relies on getProxiedRemoteAddress() to handle some form of IP-level blocking, rate limiting or such, then that assumption was broken.
⚡️ Formerly, in such a set-up a remote end user could spoof their getProxiedRemoteAddress() by just sending an extra PROXY v2 frame. This works, since the L4 TCP proxy has no understanding of what is invalid HTTP, and uWS would just update its record for the connection.
This has been fixed now, and both L7 and L4 proxies can be used together with UWS_WITH_PROXY.
Reported by @Carmel0
Other changes:
- ⚡️ preOpen, adoptSocket now takes 2 extra arguments for IP. This breaks API compatibility for certain uses, but should be easy to update. Most users would rely on abstractions like the uWS::LocalCluster feature.
- 💅 onWritable can now be safely set inside of itself, for recursive-styled use cases