Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Commit

Permalink
Bump version 3.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Sep 14, 2024
1 parent 555661d commit 8483a3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tun2"
version = "3.1.3"
version = "3.1.4"
edition = "2021"
authors = ["meh. <[email protected]>", "@ssrlive"]
license = "WTFPL"
Expand All @@ -25,7 +25,7 @@ tokio = { version = "1", features = [
], optional = true }
tokio-util = { version = "0.7", features = ["codec"], optional = true }

[target.'cfg(any(target_os = "linux", target_os = "macos", target_os = "android", target_os="freebsd"))'.dependencies]
[target.'cfg(unix)'.dependencies]
nix = { version = "0.29", features = ["ioctl"] }

[target.'cfg(target_os = "windows")'.dependencies]
Expand All @@ -39,7 +39,7 @@ windows-sys = { version = "0.59", features = [
"Win32_UI_WindowsAndMessaging",
"Win32_System_LibraryLoader",
] }
wintun-bindings = { version = "0.7", features = [
wintun-bindings = { version = "^0.7.7", features = [
"panic_on_unsent_packets",
"verify_binary_signature",
"async",
Expand Down
8 changes: 4 additions & 4 deletions src/async/win_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ impl AsyncDevice {
}

/// Recv a packet from tun device - Not implemented for windows
pub async fn recv(&self, _buf: &mut [u8]) -> std::io::Result<usize> {
unimplemented!()
pub async fn recv(&self, buf: &mut [u8]) -> std::io::Result<usize> {
self.session_reader.session.recv(buf).await
}

/// Send a packet to tun device - Not implemented for windows
pub async fn send(&self, _buf: &[u8]) -> std::io::Result<usize> {
unimplemented!()
pub async fn send(&self, buf: &[u8]) -> std::io::Result<usize> {
self.session_writer.session.send(buf).await
}
}

Expand Down

0 comments on commit 8483a3d

Please sign in to comment.