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:28:42 +03:00
parent c3bd49874b
commit c958b82b8f

View File

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