Open emiddleton opened 4 years ago
Splitting streams to two specifies is not currently supported.
Do you maybe have an idea for versatile and composable command line syntax for it and semantics of what exactly would happen?
Note that now there is a log:
overlay which can be used to log things to stderr (which can be redirected to a file).
websocat -B 500000 -v -v --text log:ws-listen:127.0.0.1:9943 log:ws://127.0.0.1:9944
this is just a small example with the websocat 1.8.0 version. Don't forget to use your personal ports e.t.c. this one is just proxing all data from 9943 port to 9944 and logs them both. p.s. I have also chosen a huge buffer size
@alexeycrystal Note that such proxy would mangle binary WebSocket messages, converting them into text ones and maybe changing some bytes (such as newlines).
To be able to forward both text and binary WebSocket messages reliably you need --base64
, --binary-prefix
, --text-prefix
and maybe --base64-text
options.
Is it possible to log traffic being proxied to a file? I am trying to debug json-rpc over a websocket and would like to be able to see what is being sent and received.