MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / WebsocketMessageHook

Class WebsocketMessageHook

mitmproxy/proxy/layers/websocket.py:33–41  ·  view source on GitHub ↗

Called when a WebSocket message is received from the client or server. The most recent message will be flow.messages[-1]. The message is user-modifiable. Currently there are two types of messages, corresponding to the BINARY and TEXT frame types.

Source from the content-addressed store, hash-verified

31
32@dataclass
33class WebsocketMessageHook(StartHook):
34 """
35 Called when a WebSocket message is received from the client or
36 server. The most recent message will be flow.messages[-1]. The
37 message is user-modifiable. Currently there are two types of
38 messages, corresponding to the BINARY and TEXT frame types.
39 """
40
41 flow: http.HTTPFlow
42
43
44@dataclass

Callers 1

relay_messagesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…