# 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 ([Require Atlantis Framework](#2.-capture-ws-wss-from-ios-ipados-apps)).
* 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, ...&#x20;
* Auto decode Binary Message to JSON if possible
* Open WebSocket messages by external Editors, such as Sublime, VSCode

## 2. Capture WS/WSS from iOS/iPadOS apps

### Problem

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.

### Solution

Use [Atlantis Framework](https://github.com/ProxymanApp/atlantis#features) to capture WS/WSS traffic.

Read more at <https://github.com/ProxymanApp/atlantis#wswss-traffic>

### Screenshots

![Capture Websocket](/files/tdhepgJwBCnQytdr4XN6)

## 3. Map Websocket from Localhost <-> Production

It's possible to map the WebSocket Traffic from localhost <-> Production. Please check out the [Map Remote Tool.](https://docs.proxyman.com/~/revisions/CTFzuwrlmsieJaiDVRDD/advanced-features/pages/-M5kYD509H9yll6_m0g4#7.4-map-websocket-from-localhost-to-production)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.proxyman.com/~/revisions/CTFzuwrlmsieJaiDVRDD/advanced-features/websocket.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
