Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
https://insomnia.rest
Apache License 2.0
34.34k stars 1.93k forks source link

WebSocket requests not routed through the configured proxy #5562

Open LunaticoCR opened 1 year ago

LunaticoCR commented 1 year ago

Expected Behavior

If I set an http network proxy on my Insomnia preferences I want all my requests to go through that proxy, including ws/wss connections.

Actual Behavior

Even though I have a proxy configured, WebSocket requests are not going though that proxy. All other normal http/https requests do go through the proxy.

Reproduction Steps

  1. Create a new WebSocket request
  2. Test it without any proxy settings, verify it works
  3. Configure a proxy under Insomnia preferences
  4. Try to make a connection with that same WebSocket request, observe that the request still works but it does not go through the proxy

Is there an existing issue for this?

Additional Information

The proxy in question is mitmproxy which I use regularly to capture and analyse traffic. I am able to observe all other http/https requests I make from Insomnia on the mitmproxy interface, but not the ws/wss connections. I do see ws/wss connections made by my application on the mitmproxy interface. If I turn the mitmproxy off but leave the proxy settings configured on Insomnia, the WebSocket request still works (meaning is not going through the proxy) but all other http/https requests wouldn't work, as expected.

Insomnia Version

2022.6.0

What operating system are you using?

macOS

Operating System Version

macOS Ventura 13.1

Installation method

Download from Insomnia website

Last Known Working Insomnia version

No response

Lamisedaxeh commented 1 month ago

For information i can confirm, i got the same issue on Arch Linux:

Version: Insomnia 9.3.3
Build date: 01/08/2024
OS: Linux x64 6.10.2-arch1-1
Electron: 30.2.0
Node: 20.15.0
Node ABI: 123
V8: 12.4.254.20-electron.0
Architecture: x64