erebe / wstunnel

Tunnel all your traffic over Websocket or HTTP2 - Bypass firewalls/DPI - Static binary available
Other
3.26k stars 292 forks source link

eprintln of "Starting STDIO server" #275

Closed daaku closed 2 weeks ago

daaku commented 2 weeks ago

Would it be reasonable to move this to use logging so it is silenced when --log-level=ERROR is used?

https://github.com/erebe/wstunnel/blob/0595e230504d24de6587987a355bc3d1697ae789/src/stdio.rs#L6

erebe commented 2 weeks ago

Hello,

Sadly no, because once the logger is init, we can't disable it/nor turn it off. And in stdio mode, the logger will not have access to stdio, as it is already used.

Does it causes you any issue beside seeing the log ?

daaku commented 2 weeks ago

Nope, no issues. Just visual noise. Could the logger use stderr in this mode? Feel free to close the issue if it's not worth the trouble.

Also, thanks for making this. It's working great to reverse proxy ssh connections. It's super light weight, low memory usage, network performance is great too.

erebe commented 2 weeks ago

stderr is a good idea, let me check if I can manage to redirect the logger to it.

Thank you for the kind words 🙏

erebe commented 2 weeks ago

Would you mind trying this pre-release and let me know if it works for you ?

daaku commented 2 weeks ago

Does the trick - thank you!