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