diff --git a/src/client.rs b/src/client.rs index 4938488..57b5d7f 100644 --- a/src/client.rs +++ b/src/client.rs @@ -24,7 +24,7 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32) { sock.connect(&client_config.server.endpoint).await.unwrap(); let mut config = tun2::Configuration::default(); - config.raw_fd(fd).up(); + config.raw_fd(fd); let dev = tun2::create(&config).unwrap(); 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 cipher_shared_clone = cipher_shared.clone(); - /*tokio::spawn(async move { + tokio::spawn(async move { let mut buf = vec![0; 4096]; loop { @@ -100,7 +100,7 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32) { drop(s_cipher); } } - });*/ + }); let pkey = BASE64_STANDARD.decode(client_config.client.public_key).unwrap(); let handshake = UDPVpnHandshake{ public_key: pkey, request_ip: client_config.client.address.parse::().unwrap() };