You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: advanced-features/websocket.md
+26-12Lines changed: 26 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
description: Capture and decrypt WS/WSS with Proxyman
2
+
description: Capture and debug Websocket from iOS devices / simulators with Proxyman
3
3
---
4
4
5
5
# WebSocket
@@ -22,17 +22,24 @@ Proxyman could capture WebSocket (WS) and Secure WebSocket (WSS) traffic and eas
22
22
23
23
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.
24
24
25
-
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.
25
+
***Reason**: Apple's intention. **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.
26
+
* Example Ap: [https://github.com/ProxymanApp/websocket-example-ios-app](https://github.com/ProxymanApp/websocket-example-ios-app)
26
27
27
28
### ✅ Solution 1 (Recommended for iOS 17 or later)
28
29
29
-
1. Proxyman Setup:\
30
-
Tools > Proxy Settings > SOCKS Proxy settings -> Enable it (Take note of the port)
31
-
2. App Setup:\
32
-
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.
30
+
1. Follow the Setup guide for your [iOS Devices](../debug-devices/ios-device.md) or [iOS Simulators](../debug-devices/ios-simulator.md) (Make sure we installed and trusted the certificate on your device)
31
+
2. Proxyman Setup: Tools > Proxy Settings > SOCKS Proxy settings -> Enable it (Take note of the port)
32
+
3. On the main Proxyman app -> Take note of a current IP in the Proxyman Tools bar
33
+
34
+
<figure><imgsrc="../.gitbook/assets/proxyman_capture_websocket_4.jpeg"alt=""><figcaption><p>Get Proxyman current IP</p></figcaption></figure>
35
+
36
+
37
+
38
+
4. On your app: Configure a SOCK Proxy 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.
33
39
34
40
* For NWConnection
35
41
42
+
{% code overflow="wrap" fullWidth="false" %}
36
43
```swift
37
44
let parameters = webSocketURL.scheme=="wss"? NWParameters.tls: NWParameters.tcp
<figure><imgsrc="../.gitbook/assets/Screenshot 2024-11-29 at 1.17.23 PM.jpg"alt=""><figcaption><p>Capture Websocket from iOS with Proxyman</p></figcaption></figure>
72
85
73
-
Credit to [**FranklinSamboni**](https://github.com/FranklinSamboni)**->**[https://github.com/ProxymanApp/Proxyman/issues/586#issuecomment-2125082129](https://github.com/ProxymanApp/Proxyman/issues/586#issuecomment-2125082129)
86
+
* Credit to [**FranklinSamboni**](https://github.com/FranklinSamboni)**->**[https://github.com/ProxymanApp/Proxyman/issues/586#issuecomment-2125082129](https://github.com/ProxymanApp/Proxyman/issues/586#issuecomment-2125082129)
Copy file name to clipboardExpand all lines: scripting/environment-variables.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ From Proxyman 2.25.0+, the **sharedState** is available across different scripts
49
49
{% endhint %}
50
50
51
51
{% hint style="info" %}
52
-
Prior to Proxyman 2.24.0**,** the **sharedState** is only alive on the current flow that executes the script and it's released when the script is run over. 
52
+
Prior to Proxyman 2.24.0**,** the **sharedState** is only alive on the current flow that executes the script and it's released when the script is run over. 
53
53
{% endhint %}
54
54
55
55
To clear all data, please consider using \`clearSharedState\` function.
0 commit comments