[GH-ISSUE #298] Websocket: WSS #3 #298

Open
opened 2026-03-03 19:49:42 +03:00 by kerem · 1 comment
Owner

Originally created by @NghiaTranUIT on GitHub (Aug 23, 2023).
Original GitHub issue: https://github.com/ProxymanApp/proxyman-windows-linux/issues/298

Originally assigned to: @kics223w1 on GitHub.

Description

⚠️ Do not implement this ticket until the #296 and #297 and reviewed and working fine.

It's time to support WSS.

How to start a Secure Websocket

  1. Open Proxyman for macOS
  2. Clone this repo: https://github.com/NghiaTranUIT/websocket-usercases
  3. Start Proxyman for macOS on port 9090
  4. npm i
  5. npm run start_wss
  6. Observe the WebSocket flow on the app

There are two scenarios:

  1. SSL Proxying is not enabled -> The WSS socket working fine -> No Error -> Able to see web socket message on the VSCode Console Log
  2. SSL Proxying is enabled for this domain -> The WSS socket working fine -> No Error -> Able to see web socket message on the VSCode Console Log and the Proxyman app

UI

  • The UI & Logic should work the same as #297
  • I'm able to see Secure WebSocket Message
Originally created by @NghiaTranUIT on GitHub (Aug 23, 2023). Original GitHub issue: https://github.com/ProxymanApp/proxyman-windows-linux/issues/298 Originally assigned to: @kics223w1 on GitHub. ## Description ⚠️ Do not implement this ticket until the #296 and #297 and reviewed and working fine. It's time to support WSS. ## How to start a Secure Websocket 1. Open Proxyman for macOS 2. Clone this repo: https://github.com/NghiaTranUIT/websocket-usercases 3. Start Proxyman for macOS on port 9090 4. npm i 5. npm run start_wss 6. Observe the WebSocket flow on the app There are two scenarios: 1. SSL Proxying is not enabled -> The WSS socket working fine -> No Error -> Able to see web socket message on the VSCode Console Log 2. SSL Proxying is enabled for this domain -> The WSS socket working fine -> No Error -> Able to see web socket message on the VSCode Console Log and the Proxyman app ## UI - The UI & Logic should work the same as #297 - I'm able to see Secure WebSocket Message
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 23, 2023):

Unit Tests

1. WSS with no SSL Proxying

  • Given: Start a WSS from the repo, proxy to Proxyman, and make sure the SSL Proxying Tool is disabled (No SSL)
  • Expected:
    => The shell script works fine, no error
    => Capture the stdout of the shell script -> Assert the output -> Have the data properly
    => Assert the Pool has 1 flow -> Assert the URL

For example:

WS connection is opened! URL = ws://echo.websocket.events
[NodeJS] Websocket Client is opened!
[NodeJS] ⬆️ Send JSON 1
[NodeJS] ⬆️ Ping
[NodeJS] ⬇️ Received: echo.websocket.events sponsored by Lob.com
[NodeJS] ⬇️ Received: Hello from Proxyman Websocket Client
[NodeJS] ⬇️ Received: {"name":"John","age":30,"city":"New York"}
[NodeJS] ⬇️ Pong!
[NodeJS] ⬆️ Send JSON 2
[NodeJS] ⬇️ Received: {"name":"Noah","items":[1,2,3,4]}
[NodeJS] Closed!

2. WSS with SSL Proxying

  • Given: Start a WSS from the repo, proxy to Proxyman, and make sure the SSL Proxying Tool is enabled.
  • Expected:
    => The shell script works fine, with no error
    => Get the FlowPool -> Get the first websocket message -> Assert the URL: Make sure it's wss:// format, Assert the storage (Message total, data, ...)
<!-- gh-comment-id:1689197236 --> @NghiaTranUIT commented on GitHub (Aug 23, 2023): ## Unit Tests - Read this comment to understand how to prepare the test: https://github.com/ProxymanApp/proxyman-windows-linux/issues/297#issuecomment-1689188542 - Since we're working on WSS, we use the script `npm run start_wss` ### 1. WSS with no SSL Proxying - Given: Start a WSS from the repo, proxy to Proxyman, and make sure the SSL Proxying Tool is disabled (No SSL) - Expected: => The shell script works fine, no error => Capture the stdout of the shell script -> Assert the output -> Have the data properly => Assert the Pool has 1 flow -> Assert the URL For example: ``` WS connection is opened! URL = ws://echo.websocket.events [NodeJS] Websocket Client is opened! [NodeJS] ⬆️ Send JSON 1 [NodeJS] ⬆️ Ping [NodeJS] ⬇️ Received: echo.websocket.events sponsored by Lob.com [NodeJS] ⬇️ Received: Hello from Proxyman Websocket Client [NodeJS] ⬇️ Received: {"name":"John","age":30,"city":"New York"} [NodeJS] ⬇️ Pong! [NodeJS] ⬆️ Send JSON 2 [NodeJS] ⬇️ Received: {"name":"Noah","items":[1,2,3,4]} [NodeJS] Closed! ``` ### 2. WSS with SSL Proxying - Given: Start a WSS from the repo, proxy to Proxyman, and make sure the SSL Proxying Tool is enabled. - Expected: => The shell script works fine, with no error => Get the FlowPool -> Get the first websocket message -> Assert the URL: Make sure it's `wss://` format, Assert the storage (Message total, data, ...)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxyman-windows-linux#298
No description provided.