ProxymanApp / Proxyman

Modern. Native. Delightful Web Debugging Proxy for macOS, iOS, and Android ⚡️
https://proxyman.io
5.71k stars 189 forks source link

Clearing session terminates all open connections #1505

Open laverdet opened 1 year ago

laverdet commented 1 year ago

Description

When using the "clear entire session" [trashcan] button all pending connections are forcefully terminated.

Steps to Reproduce

  1. Open Proxyman
  2. Visit any site that uses WebSockets [for example, facebook.com]
  3. In your web browser open the "Networks" debug pane
  4. Observe a number of open WebSockets
  5. Additionally, observe them in Proxyman
  6. Click the trashcan button
  7. Observe in the "Networks" browser pane that all WebSockets have been terminated
  8. Observe in Proxyman that the browser [JavaScript] will probably reinitialize those sockets
  9. Each time the session is cleared all open connections are terminated, potentially leading to confusion in the browser

Current Behavior

[as described above]

Expected Behavior

In Charles Proxy [similar application], when clearing a session all open connections will remain open and carry forward to the new session. From there we can individually terminate the connections manually if we want to. I would expect similar behavior from Proxyman, or maybe even Shift + Click would terminate all connections.

This also applies to non-WebSocket requests which are just taking a long time. For example, clearing a session will terminate any downloads of large files, or requests which simply haven't resolved yet.

Environment

NghiaTranUIT commented 1 year ago

Thanks for your suggestion. I admit that it's the shortcoming of Proxyman. Currently, "Clear Session", "Clear Table", or "Delete the request" would also stop its connection too.

The reason is I would like to reset to the initial state of all connections, so it's easier to debug.

I'd reconsider to fix it 👍

sushant-here commented 5 months ago

@NghiaTranUIT with 5.5 being the latest version - does that mean this was never fixed in 4.5? Would be nice to get this resolved. Its very annoying because it also terminates video calls. Makes pair programming over slack/zoom/teams very annoying.

NghiaTranUIT commented 5 months ago

@sushant-here it's a known issue and there is no reliable to fix it.

The problem is when clearing the Session, Proxyman must close all alive connections, so new requests will take effect by new tools, for example: SSL Proxying List, Breakpoint, and Map Local, in the subsequence connections.

If we don't close these connection, All debugging tools can't modify the request/response.


From what I see, this behavior is happened from other app too, like Charles Proxy, Fiddler, ...


You can workaround it by find all domains of your video call, then adding them to Tools Menu -> Proxy Setting -> Bypass Proxy Setting.

Screenshot 2024-06-04 at 8 49 40 AM