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-08 02:38:03 +03:00
parent c060374e05
commit caeed57eab

View File

@ -57,11 +57,12 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32, env: &JNIE
let llltx = ltx.clone();
tokio::spawn(async move {
let mut buf = vec![0; 1400]; // mtu
while let Ok(n) = dev_reader.read(&mut buf) {
loop {
if let Ok(n) = dev_reader.read(&mut buf) {
llltx.send("Read from tun.".as_bytes().to_vec());
dx.send(buf[..n].to_vec()).unwrap();
}
llltx.send("Read from tun has ended.".as_bytes().to_vec());
}
});
let priv_key = BASE64_STANDARD.decode(client_config.client.private_key).unwrap();