websocket-kit icon indicating copy to clipboard operation
websocket-kit copied to clipboard

Example of using websocket-kit with system proxy?

Open bunchjesse opened this issue 2 years ago • 1 comments

Do you have an example anywhere of how to connect to a web socket server via the system's proxy (macOS Big Sur)?

  • I'm trying to debug some of the communication using Proxyman.
    • The web socket requests do not seem to be going through the proxy.
    • Normal requests made via Foundation show up just fine.
  • I've scoured the docs and existing issues in this repository but haven't found what I'm looking for.
try await WebSocket.connect(to: url, on: eventLoopGroup) { socket in
  ...
}

bunchjesse avatar May 14 '22 18:05 bunchjesse

Vapor's WebsocketKit does not currently support connecting to a websocket server via a proxy. It's something we'd need to add and could add by adding a proxy channel handler to our bootstrap (as hinted at here)

0xTim avatar May 15 '22 04:05 0xTim

This should be solved by #130

0xTim avatar May 25 '23 11:05 0xTim