Add support for STDIO for windows

This commit is contained in:
Σrebe - Romain GERARD 2023-12-13 22:27:42 +01:00
parent 1eb1d95873
commit 1844ea3106
No known key found for this signature in database
GPG key ID: 7A42B4B97E0332F4
4 changed files with 280 additions and 84 deletions

View file

@ -1,6 +1,5 @@
mod embedded_certificate;
mod socks5;
#[cfg(target_family = "unix")]
mod stdio;
mod tcp;
mod tls;
@ -728,9 +727,8 @@ async fn main() {
});
}
#[cfg(target_family = "unix")]
LocalProtocol::Stdio => {
let server = stdio::run_server().await.unwrap_or_else(|err| {
let server = stdio::server::run_server().await.unwrap_or_else(|err| {
panic!("Cannot start STDIO server: {}", err);
});
tokio::spawn(async move {
@ -745,10 +743,6 @@ async fn main() {
}
});
}
#[cfg(not(target_family = "unix"))]
LocalProtocol::Stdio => {
panic!("stdio is not implemented for non unix platform")
}
LocalProtocol::ReverseTcp => {}
LocalProtocol::ReverseUdp { .. } => {}
LocalProtocol::ReverseSocks5 => {}