Fix WebSocket proxy implementation issues#33
Closed
Copilot wants to merge 4 commits intofeature/simpleproxy-websocket-upgradefrom
Closed
Fix WebSocket proxy implementation issues#33Copilot wants to merge 4 commits intofeature/simpleproxy-websocket-upgradefrom
Copilot wants to merge 4 commits intofeature/simpleproxy-websocket-upgradefrom
Conversation
Merged
- Fix HTTP version formatting (was using Debug format) - Improve error handling for malformed HTTP responses - Add helper function to detect WebSocket upgrades (reduces duplication) - Improve header parsing robustness (handle colons in values) - Remove unused send_request_no_cache function - Remove redundant underscore assignment in tunnel function Co-authored-by: arloor <21768987+arloor@users.noreply.github.com>
- Check URI scheme to determine if TLS is needed - Wrap TCP connection with TLS for wss:// URIs - Update tunnel function to handle EitherTlsStream - Add proper TLS handshake logging Co-authored-by: arloor <21768987+arloor@users.noreply.github.com>
- Correct HTTP/2 and HTTP/3 version strings per RFC specs - Revert header end detection to explicit CRLF/LF check Co-authored-by: arloor <21768987+arloor@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Address feedback on websocket proxy support PR
Fix WebSocket proxy implementation issues
Jan 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses code review feedback on #32. The original implementation had critical bugs preventing WebSocket upgrades and lacked TLS support for
wss://connections.Critical Fixes
HTTP version formatting - Request line was malformed using Debug format:
TLS/WSS support - Added secure WebSocket handling:
wss://scheme viais_schema_secure()tunnel_websocket_forwardto acceptEitherTlsStreamHeader parsing - Fixed response header parsing to handle colons in values using
find(':')instead ofsplit_once(':')Code Quality
is_websocket_upgrade()helper to eliminate duplicationsend_request_no_cachefunctionunwrap_or("")💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.