From 13942a5050037f862053b645050711a17dec1cf2 Mon Sep 17 00:00:00 2001 From: alterdekim Date: Fri, 4 Oct 2024 22:54:39 +0300 Subject: [PATCH] modified: src/client.rs --- src/client.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/client.rs b/src/client.rs index 57b5d7f..1ad99ae 100644 --- a/src/client.rs +++ b/src/client.rs @@ -37,7 +37,7 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32) { let cipher_shared: Arc>> = Arc::new(Mutex::new(None)); - tokio::spawn(async move { + /* tokio::spawn(async move { while let Ok(bytes) = rx.recv() { info!("Write to tun."); dev_writer.write_all(&bytes).unwrap(); @@ -133,5 +133,11 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32) { warn!("There is no shared_secret in main loop"); } } + }*/ + + let mut buf = vec![0; 8192]; + while let Ok(n) = dev_reader.read(&mut buf) { + info!("Read from tun. {:?} bytes", n); } + info!("end."); } \ No newline at end of file