This commit addresses the immediate issue where socks-proxy-agent would fail
with 'UnsupportedProxyProtocol' error in Bun.
Changes:
- Convert SocksProxyAgent proxy objects to SOCKS URLs in Node.js HTTP client
- Add socks4:// and socks5:// protocol recognition in HTTPThread.zig
- Add is_socks_proxy flag to HTTPClient flags
- Add basic SOCKS connection handling infrastructure
Current Status:
- ✅ Fixes 'UnsupportedProxyProtocol' error - the primary issue reported
- ✅ SOCKS proxy agents can now be created and used without errors
- ⚠️ Full SOCKS proxy routing requires additional implementation
The current implementation provides basic SOCKS protocol recognition but does
not yet implement the complete bidirectional SOCKS handshake protocol required
for actual proxy routing. This is a foundation for future SOCKS support.
Related: #16812 (Add SOCKS support)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Move `DebugThreadLock` to `bun.safety`
* Enable in `ci_assert` builds, but store stack traces only in debug
builds
* Reduce size of struct by making optional field non-optional
* Add `initLockedIfNonComptime` as a workaround for not being able to
call `initLocked` in comptime contexts
* Add `lockOrAssert` method to acquire the lock if unlocked, or else
assert that the current thread acquired the lock
* Add stack traces to `CriticalSection` and `AllocPtr` in debug builds
* Make `MimallocArena.init` infallible
* Make `MimallocArena.heap` non-nullable
* Rename `RefCount.active_counts` to `raw_count` and provide read-only
`get` method
* Add `bun.safety.alloc.assertEq` to assert that two allocators are
equal (avoiding comparison of undefined `ptr`s)
(For internal tracking: fixes STAB-917, STAB-918, STAB-962, STAB-963,
STAB-964, STAB-965)
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
### What does this PR do?
### How did you verify your code works?
---------
Co-authored-by: Claude Bot <claude-bot@bun.sh>
Co-authored-by: Claude <noreply@anthropic.com>