modified: src/client.rs
All checks were successful
gitea/Frida-android-native/pipeline/head This commit looks good

This commit is contained in:
Michael Wain 2024-10-04 23:23:37 +03:00
parent 2a62090b53
commit c3bd49874b

View File

@ -27,7 +27,7 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32) {
config.raw_fd(fd).up();
let dev = tun2::create(&config).unwrap();
let (mut dev_reader, mut dev_writer) = dev.split();
//let (mut dev_reader, mut dev_writer) = dev.split();
let sock_rec = Arc::new(sock);
let sock_snd = sock_rec.clone();
@ -134,9 +134,9 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32) {
}
}
}*/
let mut buf = vec![0; 8192];
let mut buf = vec![0; 256];
loop {
while let Ok(n) = dev_reader.read(&mut buf) {
while let Ok(n) = dev.recv(&mut buf) {
info!("Read from tun. {:?} bytes", n);
}
}