I inspect a HTTPS WebSocket traffic with Mitmproxy. Currently I can read/edit WS messages with:
class Intercept:
def websocket_message(self, flow):
print(flow.messages[-1])
def start():
return Intercept()
.. as attached script to Mitmproxy.
How do I push/inject my own message to the client? Not edit existing one, but add a new message.