Hi all,
First of all, thanks for the all the work behind the Gorilla websockets project. I just discovered it and looks really nice.
Here it goes my question, I want to build a proxy for the whole websocket communication (including the protocol upgrade by HTTP). I have an application that communicates using websockets. The messages are sent using an specific binary format, so in my code I want to do the following process:
- Handle the connection process in HTTP, verifying the headers sent in the first HTTP connection.
- For every subsequent websocket message, parse the binary structure (I already have a function for parsing it), modify a string value and send it to the original destination in the binary format again.
I'm a bit lost in how to just intercept the websocket connection and access to the binary data.