[GH-ISSUE #815] WebSocket connection requests are held up by Proxyman until the client sends the first message #810

Closed
opened 2026-03-03 19:22:06 +03:00 by kerem · 7 comments
Owner

Originally created by @DL444 on GitHub (Mar 12, 2021).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/815

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? (Ex. Proxyman 1.4.3)

2.19.0

macOS Version? (Ex. mac 10.14)

11.2.3

Steps to reproduce

  1. First test without Proxyman running.
  2. Visit https://www.piesocket.com/websocket-tester
  3. Click Connect.
  4. Note that immediately after connecting you will receive an initial message that looks like {"info":"You are using a test api key"}. This means the server has received your connection request.
  5. Disconnect from server.
  6. Setup Proxyman proxy and enable TLS decryption for demo.websocket.me
  7. Click Connect again.
  8. The WebSocket request shows up in Proxyman with a yellow indicator. Note that the initial message previously received is not shown.
  9. Wait for a moment to confirm that the request stays in this state indefinitely.
  10. Click Send to send a message.
  11. The request indicator in Proxyman turns green, the initial message appears, and the server echos your message. This proves that the server will not receive connection request before the client send the first message.

Expected behavior

The server receives connection request immediately after connection.

Additional info

Being able to connect to the server without client sending the first message is useful in server-push-only scenarios. Of course, we can workaround this by having the client send a small message after initiating connection. But it feels wrong to me having to add additional code in order to workaround an issue in a debugging tool.

Originally created by @DL444 on GitHub (Mar 12, 2021). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/815 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? (Ex. Proxyman 1.4.3) 2.19.0 ### macOS Version? (Ex. mac 10.14) 11.2.3 ### Steps to reproduce 1. First test without Proxyman running. 2. Visit https://www.piesocket.com/websocket-tester 3. Click *Connect*. 4. Note that immediately after connecting you will receive an initial message that looks like `{"info":"You are using a test api key"}`. This means the server has received your connection request. 5. Disconnect from server. 6. Setup Proxyman proxy and enable TLS decryption for `demo.websocket.me` 7. Click *Connect* again. 8. The WebSocket request shows up in Proxyman with a yellow indicator. Note that the initial message previously received is not shown. 9. Wait for a moment to confirm that the request stays in this state indefinitely. 10. Click *Send* to send a message. 11. The request indicator in Proxyman turns green, the initial message appears, and the server echos your message. This proves that the server will not receive connection request before the client send the first message. ### Expected behavior The server receives connection request immediately after connection. ### Additional info Being able to connect to the server without client sending the first message is useful in server-push-only scenarios. Of course, we can workaround this by having the client send a small message after initiating connection. But it feels wrong to me having to add additional code in order to workaround an issue in a debugging tool.
kerem 2026-03-03 19:22:06 +03:00
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 13, 2021):

Thanks for the detailed input. We will look at it this week and send you a beta build asap 👍

<!-- gh-comment-id:797850712 --> @NghiaTranUIT commented on GitHub (Mar 13, 2021): Thanks for the detailed input. We will look at it this week and send you a beta build asap 👍
Author
Owner

@BenTilbrook commented on GitHub (Mar 17, 2021):

I have a similar problem. Can you send me a beta build to test also?

<!-- gh-comment-id:801464341 --> @BenTilbrook commented on GitHub (Mar 17, 2021): I have a similar problem. Can you send me a beta build to test also?
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 18, 2021):

Sorry to hear that. I was super busy last week with other features. I'm on it now 😄

<!-- gh-comment-id:801525330 --> @NghiaTranUIT commented on GitHub (Mar 18, 2021): Sorry to hear that. I was super busy last week with other features. I'm on it now 😄
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 20, 2021):

Hey @BenTilbrook and @DL444 Sorry for the delay. Here is the beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.20.0_Bug_Websocket.dmg

The reason was Proxyman only makes a WS connection to the destination server as soon as it receives the first WS message from the client. It's wrong and causes the bug.

I fixed it. Proxyman should connect to the server as soon as it's a WS/WSS.

Screen_Shot_2021-03-20_at_14_15_44
<!-- gh-comment-id:803268473 --> @NghiaTranUIT commented on GitHub (Mar 20, 2021): Hey @BenTilbrook and @DL444 Sorry for the delay. Here is the beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.20.0_Bug_Websocket.dmg The reason was Proxyman only makes a WS connection to the destination server as soon as it receives the first WS message from the client. It's wrong and causes the bug. I fixed it. Proxyman should connect to the server as soon as it's a WS/WSS. <img width="2163" alt="Screen_Shot_2021-03-20_at_14_15_44" src="https://user-images.githubusercontent.com/5878421/111863142-4e7a5980-898c-11eb-8c3a-5c84a68dbd1a.png">
Author
Owner

@DL444 commented on GitHub (Mar 20, 2021):

@NghiaTranUIT
I can confirm that the problem is now fixed.

<!-- gh-comment-id:803271937 --> @DL444 commented on GitHub (Mar 20, 2021): @NghiaTranUIT I can confirm that the problem is now fixed.
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 20, 2021):

Thanks. I will ship this fix in the next release 🙌

<!-- gh-comment-id:803272133 --> @NghiaTranUIT commented on GitHub (Mar 20, 2021): Thanks. I will ship this fix in the next release 🙌
Author
Owner

@DL444 commented on GitHub (Mar 24, 2021):

Since the fix is now publicly released, I think it might be a good time to close this issue.

<!-- gh-comment-id:805988299 --> @DL444 commented on GitHub (Mar 24, 2021): Since the fix is now publicly released, I think it might be a good time to close this issue.
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#810
No description provided.