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
8.8k stars 440 forks source link

Use tokio_util::sync::CancellationToken to quit service #371

Closed sword-jin closed 1 week ago

sword-jin commented 1 week ago

I see we have used tokio_util module, it provides a dedicated way https://docs.rs/tokio-util/latest/tokio_util/sync/struct.CancellationToken.html to cancel something.