Improve stdio tunnel on windows

- Handle CTRL+C to exit properly
- Restore terminal mode at exit
- Use logger to stderr
This commit is contained in:
erebe 2024-05-18 11:23:22 +02:00 committed by Σrebe - Romain GERARD
parent 0595e23050
commit 9b82006c6e
No known key found for this signature in database
GPG key ID: 7A42B4B97E0332F4
3 changed files with 41 additions and 28 deletions

View file

@ -167,7 +167,7 @@ async fn run_tunnel(
Ok((remote, Box::pin(local_rx), Box::pin(local_tx)))
}
#[cfg(not(unix))]
LocalProtocol::ReverseUnix { ref path } => {
LocalProtocol::ReverseUnix { .. } => {
error!("Received an unsupported target protocol {:?}", remote);
Err(anyhow::anyhow!("Invalid upgrade request"))
}