diff --git a/client/Cargo.toml b/client/Cargo.toml index 339c2af..09a53e1 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -9,6 +9,8 @@ bytes = "1" tonic = "0.12" prost = "0.13" crossbeam-queue = "0.3" +hex = "0.4" +snow = "0.9" [profile.release] opt-level = "z" diff --git a/client/src/tun.rs b/client/src/tun.rs index 7585bd5..e7d3b5e 100644 --- a/client/src/tun.rs +++ b/client/src/tun.rs @@ -1,4 +1,4 @@ -use std::ffi::{c_void, OSString, OsString}; +use std::ffi::{c_void, OsString}; use std::os::windows::ffi::OsStrExt; use std::ptr::{null_mut}; use std::io::{self, Read, Write}; @@ -94,7 +94,7 @@ impl TunInterface { let packet_ptr = *packet_ptr_ptr; std::ptr::copy_nonoverlapping(buf.as_ptr(), packet_ptr, buf.len()); - if WintunSendPacket(self.tx_ring, &mut packet_ptr_ptr) { + if WintunSendPacket(self.tx_ring, packet_ptr_ptr) { Ok(buf.len()) } else { Err(io::Error::new(io::ErrorKind::Other, "Failed to send packet"))