diff --git a/.gitmodules b/.gitmodules index b08a228..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "boringtun"] - path = boringtun - url = ../boringtun.git diff --git a/Cargo.lock b/Cargo.lock index 2410bec..d433e56 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -164,30 +164,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "boringtun" -version = "0.6.0" -dependencies = [ - "aead", - "base64", - "blake2", - "chacha20poly1305", - "hex", - "hmac", - "ip_network", - "ip_network_table", - "libc", - "nix", - "parking_lot", - "ring", - "socket2", - "thiserror 2.0.17", - "tracing", - "uniffi", - "untrusted", - "x25519-dalek", -] - [[package]] name = "byteorder" version = "1.5.0" @@ -380,12 +356,38 @@ dependencies = [ "syn", ] +[[package]] +name = "defguard_boringtun" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "491589622056dd3c47b7aa3bc4727633ebf5d38462486209b7f04bef6c50075f" +dependencies = [ + "aead", + "base64", + "blake2", + "chacha20poly1305", + "hex", + "hmac", + "ip_network", + "ip_network_table", + "libc", + "nix", + "parking_lot", + "ring", + "socket2", + "thiserror 2.0.17", + "tracing", + "uniffi", + "untrusted", + "x25519-dalek", +] + [[package]] name = "defguard_wireguard_rs" version = "0.8.0" dependencies = [ "base64", - "boringtun", + "defguard_boringtun", "env_logger", "ipnet", "libc", diff --git a/Cargo.toml b/Cargo.toml index e269e01..b099ac0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,9 +25,9 @@ tracing = "0.1" tracing-subscriber = "0.3" [target.'cfg(unix)'.dependencies] -boringtun = { path = "boringtun/boringtun", default-features = false, features = [ +defguard_boringtun = { version = "0.6.0", default-features = false, features = [ "device", -] } +]} libc = { version = "0.2", default-features = false } nix = { version = "0.30", features = ["ioctl", "socket"] } diff --git a/boringtun b/boringtun deleted file mode 160000 index fd82bf9..0000000 --- a/boringtun +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fd82bf92f1a3901cd307923670ded2a244b564bc diff --git a/src/error.rs b/src/error.rs index 7442023..18cc5ba 100644 --- a/src/error.rs +++ b/src/error.rs @@ -49,5 +49,5 @@ pub enum WireguardInterfaceError { WindowsError(#[from] WindowsError), #[cfg(unix)] #[error("BoringTun {0}")] - BoringTun(#[from] boringtun::device::Error), + BoringTun(#[from] defguard_boringtun::device::Error), } diff --git a/src/wgapi.rs b/src/wgapi.rs index 561b1f6..af14116 100644 --- a/src/wgapi.rs +++ b/src/wgapi.rs @@ -2,7 +2,7 @@ use std::marker::PhantomData; #[cfg(unix)] -use boringtun::device::DeviceHandle; +use defguard_boringtun::device::DeviceHandle; #[cfg(target_os = "windows")] use wireguard_nt::Adapter; diff --git a/src/wgapi_userspace.rs b/src/wgapi_userspace.rs index 18b83b7..9aedba9 100644 --- a/src/wgapi_userspace.rs +++ b/src/wgapi_userspace.rs @@ -6,7 +6,7 @@ use std::{ time::Duration, }; -use boringtun::device::{DeviceConfig, DeviceHandle}; +use defguard_boringtun::device::{DeviceConfig, DeviceHandle}; #[cfg(target_os = "linux")] use crate::netlink;