Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions gotatun/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ rand = { workspace = true }
rand_chacha = { workspace = true }
rand_core = { workspace = true, features = ["getrandom"] }
ring = { workspace = true, optional = true }
socket2 = { workspace = true, features = ["all"] }
socket2 = { workspace = true, features = ["all"], optional = true }
thiserror = { workspace = true, optional = true }
tokio = { workspace = true, features = ["sync", "rt", "time", "macros", "net", "io-util"] }
tokio = { workspace = true, features = ["sync", "rt", "time", "macros", "io-util"] }
tun = { workspace = true, default-features = false, features = ["async"], optional = true }
typed-builder = { workspace = true }
x25519-dalek = { workspace = true, features = [
Expand Down Expand Up @@ -113,7 +113,8 @@ aws-lc-rs = ["dep:aws-lc-rs"]
# Add non-compliant UAPI support for DAITA.
# See `UAPI.md` for details.
daita-uapi = ["daita"]
device = ["thiserror"]
device = ["thiserror", "tokio/net", "socket"]
socket = ["dep:socket2", "tokio/net"]
pcap = ["dep:pcap-file"]
tun = ["dep:tun", "thiserror"]
# UDP GRO appears to be broken on Windows.
Expand Down
1 change: 1 addition & 0 deletions gotatun/src/udp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

//! Trait abstractions for UDP sockets.
//!
//! [`socket`] contains implementation for actual UDP sockets.

Check failure on line 14 in gotatun/src/udp/mod.rs

View workflow job for this annotation

GitHub Actions / Check documentation (Linux)

unresolved link to `socket`
//! [`channel`] contains implementation for tokio-based channels.

use std::{
Expand All @@ -24,6 +24,7 @@

pub mod buffer;
pub mod channel;
#[cfg(feature = "socket")]
pub mod socket;

/// An abstraction of `UdpSocket::bind`.
Expand Down Expand Up @@ -162,14 +163,14 @@

/// Get the port in use, if any.
///
/// This is applicable to UDP sockets, i.e. [`tokio::net::UdpSocket`].

Check failure on line 166 in gotatun/src/udp/mod.rs

View workflow job for this annotation

GitHub Actions / Check documentation (Linux)

unresolved link to `tokio::net::UdpSocket`
fn local_addr(&self) -> io::Result<Option<SocketAddr>> {
Ok(None)
}

/// Set `fwmark`.
///
/// This is applicable to UDP sockets, i.e. [`tokio::net::UdpSocket`].

Check failure on line 173 in gotatun/src/udp/mod.rs

View workflow job for this annotation

GitHub Actions / Check documentation (Linux)

unresolved link to `tokio::net::UdpSocket`
#[cfg(target_os = "linux")]
fn set_fwmark(&self, _mark: u32) -> io::Result<()> {
Ok(())
Expand All @@ -177,7 +178,7 @@
}

#[cfg(not(target_os = "macos"))]
fn check_send_max_number_of_packets(

Check failure on line 181 in gotatun/src/udp/mod.rs

View workflow job for this annotation

GitHub Actions / Check all feature combinations (Linux)

function `check_send_max_number_of_packets` is never used
max_number_of_packets: usize,
packets: &[(Packet, SocketAddr)],
) -> io::Result<()> {
Expand Down
Loading