From 1407e1937f0e0516029bf143eff41db10a546bb6 Mon Sep 17 00:00:00 2001 From: jmwample Date: Fri, 29 Nov 2024 09:32:12 -0700 Subject: [PATCH] minor fixes and nits --- nym-vpn-core/Cargo.lock | 1 + nym-vpn-core/crates/nym-vpn-lib/src/wg_config.rs | 4 +++- nym-vpn-core/crates/nym-wg-go/src/lib.rs | 2 +- nym-vpn-core/crates/nym-wg-go/src/wireguard_go.rs | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nym-vpn-core/Cargo.lock b/nym-vpn-core/Cargo.lock index b2108f4613..2f42e6b0bd 100644 --- a/nym-vpn-core/Cargo.lock +++ b/nym-vpn-core/Cargo.lock @@ -4851,6 +4851,7 @@ dependencies = [ "base64 0.22.1", "hex", "ipnetwork", + "rand 0.8.5", "thiserror", "tracing", "x25519-dalek", diff --git a/nym-vpn-core/crates/nym-vpn-lib/src/wg_config.rs b/nym-vpn-core/crates/nym-vpn-lib/src/wg_config.rs index e9364deeed..691ab1c09e 100644 --- a/nym-vpn-core/crates/nym-vpn-lib/src/wg_config.rs +++ b/nym-vpn-core/crates/nym-vpn-lib/src/wg_config.rs @@ -5,9 +5,11 @@ use std::{ use ipnetwork::{IpNetwork, Ipv4Network}; use nym_wg_gateway_client::GatewayData; +#[cfg(feature = "amnezia")] +use nym_wg_go::amnezia::AmneziaConfig; #[cfg(target_os = "ios")] use nym_wg_go::PeerEndpointUpdate; -use nym_wg_go::{amnezia::AmneziaConfig, wireguard_go, PeerConfig, PrivateKey, PublicKey}; +use nym_wg_go::{wireguard_go, PeerConfig, PrivateKey, PublicKey}; #[cfg(any(target_os = "ios", target_os = "android"))] use nym_wg_go::netstack; diff --git a/nym-vpn-core/crates/nym-wg-go/src/lib.rs b/nym-vpn-core/crates/nym-wg-go/src/lib.rs index 1aa65753c0..ae9de4b1d0 100644 --- a/nym-vpn-core/crates/nym-wg-go/src/lib.rs +++ b/nym-vpn-core/crates/nym-wg-go/src/lib.rs @@ -3,7 +3,7 @@ #[cfg(feature = "amnezia")] pub mod amnezia; - +#[cfg(any(target_os = "ios", target_os = "android"))] pub mod netstack; pub mod uapi; pub mod wireguard_go; diff --git a/nym-vpn-core/crates/nym-wg-go/src/wireguard_go.rs b/nym-vpn-core/crates/nym-wg-go/src/wireguard_go.rs index dd83495db5..855d0adc34 100644 --- a/nym-vpn-core/crates/nym-wg-go/src/wireguard_go.rs +++ b/nym-vpn-core/crates/nym-wg-go/src/wireguard_go.rs @@ -63,7 +63,7 @@ impl Config { config_builder.add("fwmark", fwmark.to_string().as_str()); } - #[cfg(all(feature = "amnezia"))] + #[cfg(feature = "amnezia")] if let Some(azwg_config) = &self.interface.azwg_config { azwg_config.append_to(&mut config_builder); }