modified: src/client.rs
All checks were successful
gitea/Frida-android-native/pipeline/head This commit looks good
All checks were successful
gitea/Frida-android-native/pipeline/head This commit looks good
This commit is contained in:
parent
cba765f1d9
commit
a2ce3afddb
@ -24,7 +24,7 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32) {
|
|||||||
sock.connect(&client_config.server.endpoint).await.unwrap();
|
sock.connect(&client_config.server.endpoint).await.unwrap();
|
||||||
|
|
||||||
let mut config = tun2::Configuration::default();
|
let mut config = tun2::Configuration::default();
|
||||||
config.raw_fd(fd).up();
|
config.raw_fd(fd);
|
||||||
|
|
||||||
let dev = tun2::create(&config).unwrap();
|
let dev = tun2::create(&config).unwrap();
|
||||||
let (mut dev_reader, mut dev_writer) = dev.split();
|
let (mut dev_reader, mut dev_writer) = dev.split();
|
||||||
@ -55,7 +55,7 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32) {
|
|||||||
let priv_key = BASE64_STANDARD.decode(client_config.client.private_key).unwrap();
|
let priv_key = BASE64_STANDARD.decode(client_config.client.private_key).unwrap();
|
||||||
|
|
||||||
let cipher_shared_clone = cipher_shared.clone();
|
let cipher_shared_clone = cipher_shared.clone();
|
||||||
/*tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
let mut buf = vec![0; 4096];
|
let mut buf = vec![0; 4096];
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
@ -100,7 +100,7 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32) {
|
|||||||
drop(s_cipher);
|
drop(s_cipher);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});*/
|
});
|
||||||
|
|
||||||
let pkey = BASE64_STANDARD.decode(client_config.client.public_key).unwrap();
|
let pkey = BASE64_STANDARD.decode(client_config.client.public_key).unwrap();
|
||||||
let handshake = UDPVpnHandshake{ public_key: pkey, request_ip: client_config.client.address.parse::<Ipv4Addr>().unwrap() };
|
let handshake = UDPVpnHandshake{ public_key: pkey, request_ip: client_config.client.address.parse::<Ipv4Addr>().unwrap() };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user