vi / websocat

Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
MIT License
7.18k stars 278 forks source link

Support for compression #47

Open avently opened 5 years ago

avently commented 5 years ago

Your app is cool, use it sometimes. Thank you!

Now it lacks a compression support. Here is a link I found with comments about what is it and why: https://www.igvita.com/2013/11/27/configuring-and-optimizing-websocket-compression/

It's an old page but the info should be relevant I hope.

Can you add this permessage-deflate compression into websocat? Only for client-side is enough.

vi commented 5 years ago

Maybe, but probably not in short term.

The place where it needs to be added is rust-websocket library, which is not very actively maintained.

I hesitate between improving rust-websocket and migrating Websocat to a different WebSocket library...

tibkiss commented 3 years ago

Seems like tungstenite-rs has a WiP PR which is going to implement the required functionality: https://github.com/snapview/tungstenite-rs/pull/235

Would it make sense to swap rust-websocket to tungstenite-rs to have this feature implemented?

vi commented 3 years ago

Future's Websocat v3 is indeed based on tokio-tungstenite and should gain compression support when tungstenite gains it.

But it is not feasible to make substantial changes to Websocat v1, which is based on pre-async/await Tokio 0.1. There is no specific schedule for releasing Websocat v3 either - it's unlikely to be this year. I can make a build of it for some specific use case that cannot be handled by Websocat v1 although if needed.

tibkiss commented 3 years ago

thx for your reply. good to know that v3 is in the making! I'll check it out sometime!