ProxymanApp / atlantis

Capture HTTP/HTTPS, and Websocket from iOS app without proxy.
https://proxyman.io
Apache License 2.0
1.25k stars 93 forks source link

Doesn't see WebSocket traffic with SocketRocket library #122

Open mmatiush opened 1 year ago

mmatiush commented 1 year ago

Hello,

I'm using SocketRocket library on my iOS client app. I've also installed Atlantis.

This way, on desktop Proxyman I can see all HTTPS requests made from my iOS app. However, I don't see any WebSocket requests, the tab is just empty in Proxyman.

I tried using URLSessionWebSocketTask and the WebSocket requests are correctly displayed in Proxyman.

Could you suggest what might be an issue with SocketRocket and how to fix it?

NghiaTranUIT commented 1 year ago

Hey @mmatiush, SocketRocket uses NSInputStream and NSOutputSteam to perform the Websocket connection (Reference), so Atlantis doesn't capture it since Atlantis only supports URLSessionWebSocketTask.

I look around the source code, it might support HTTP Proxy. Here is the solution:

  1. Don't use Atlantis
  2. Learn to set up the SRProxyConnect and provide a proxy to SocketRocket
  3. Set the HTTP Proxy to localhost:9090 (Should test on Simulator)
  4. Proxyman macOS will automatically capture the traffic