WebSocket
1. What's it?
Proxyman could capture WebSocket (WS) and Secure WebSocket (WSS) traffic and easily preview it.
Capture WS/WSS from iOS Physical devices and iOS Simulator (Required Atlantis framework)
Capture WS/WSS from Web Browser and Mac applications.
Capture WS/WSS from Android Physical devices or Android Emulators.
Prettier WebSocket Message.
Filter All / Sent / Received messages.
See the content in JSON / Tree Preview / HEX format.
Customize Columns: Frame, Length, Data, Time, ...
Auto decode Binary Message to JSON if possible
Open WebSocket messages by external Editors, such as Sublime, VSCode
2. Capture WS/WSS from iOS
If your iOS app is using URLSessionWebSocketTask or iOS WebSocket libraries, e.g. Starscream, SocketRocket, etc. Proxyman might not be able to capture WS/WSS traffic.
Reason: It's an intention of Apple. URLSessionWebSocketTask doesn't respect the System HTTP Proxy. All WS/WSS traffic goes directly to the Internet. Thus, Proxyman or Charles Proxy can't capture it.
✅ Solution 1 (Recommended for iOS 17 or later)
Proxyman Setup: Tools > Proxy Settings > SOCKS Proxy settings -> Enable it (Take note of the port)
App Setup: Configure a Socksv5Proxy in your App, make sure this is only available for debug builds by implementing a switch or something, you might not want your release build with this configuration.
For NWConnection
For URLSession
Credit to FranklinSamboni -> https://github.com/ProxymanApp/Proxyman/issues/586#issuecomment-2125082129
✅ Solution 2
Use Atlantis Framework (developed by Proxyman) to capture WS/WSS URLSessionWebSocketTask traffic from iOS.
Read more at https://github.com/ProxymanApp/atlantis
Screenshots
![](https://docs.proxyman.io/~gitbook/image?url=https%3A%2F%2F1856518738-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-LlPt_6BePnJ3oK3saP1%252Fuploads%252FFMTuMkSQaPOv9d5UdTBl%252Fwebsocket.png%3Falt%3Dmedia%26token%3De7096390-1bde-4917-9114-4860a3f7674a&width=768&dpr=4&quality=100&sign=86a3845b&sv=1)
3. Map Websocket from Localhost <-> Production
It's possible to map the WebSocket Traffic from localhost <-> Production. Please check out the Map Remote Tool.
Last updated