rapiz1 / rathole

A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.
Apache License 2.0
9.44k stars 475 forks source link

Flush DataChannelCmd::StartForward* commands #316

Closed RyanAD closed 7 months ago

RyanAD commented 9 months ago

Without flushing this may sit in a kernel buffer and we won't know if the channel is still alive. This is particularly problematic for the TCP connection pool.

I added flushing to the UDP handling as well, but it's less critical there.

I added a write_and_flush to helper, and then use that where needed.