I need to extend a HTTP recorder to record websocket traffic. HTTP recorder is in C / unix platform.
I know HTTP traffic will be through port 80 or 443, hence I am able to record it. In HTTP message a new port is communicated, and through that port websocket traffic passes through. Since this port is dynamic, and HTTP messages will be different in different cases I can not parse and get port for websocket.
I think of below logic, not sure if that is going to work. Need your suggestion / pointers in this regard.
I know, its a long way to go, will this approach work.