ProxymanApp / Proxyman

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

Support MessagePack for Websockets #2065

Open zotanmew opened 4 months ago

zotanmew commented 4 months ago

Description

MessagePack previewer is supported for HTTP responses. It'd be awesome if this was available for WebSocket events too, as they're currently displayed as binary data.

Why this feature/change is important?

It'd make debugging WebSocket connections that communicate through MessagePack messages infinitely easier.

NghiaTranUIT commented 4 months ago

Hi @zotanmew May I ask:

  1. Do your Websocket Response has this header: Content-Type: application/msgpack ?

I'd like to check to show the Message Pack correctly

zotanmew commented 4 months ago

It presently doesn't, though I don't think it should, since specifying a Content-Type with a 101 Switching Protocols response is probably not spec-compliant. I'll test if it works if I add it, though.

zotanmew commented 4 months ago

Hmm, it doesn't seem like it's possible to send custom headers when accepting WebSocket connections in ASP.NET MVC.

NghiaTranUIT commented 4 months ago

@zotanmew can you try this Beta build: https://download.proxyman.io/beta/Proxyman_5.6.0_try_fixing_msgpack_on_ws.dmg ?

Basically, MsgPack for Websocket is already supported on this ticket https://github.com/ProxymanApp/Proxyman/issues/1748

zotanmew commented 4 months ago

Hmm, that seems to work only for some of the messages:

image

Only one is shown in the inline preview, when I click on them there's one more that gets displayed correctly (the initial handshake):

image