From f67aca585680438970e2f69bb266363d64e47383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20L=C3=B6nnhager?= Date: Wed, 23 Oct 2024 15:11:15 +0200 Subject: [PATCH] Fix endpoint addr route --- talpid-wireguard/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/talpid-wireguard/src/lib.rs b/talpid-wireguard/src/lib.rs index 330f6f9c074b..d1e09ff57095 100644 --- a/talpid-wireguard/src/lib.rs +++ b/talpid-wireguard/src/lib.rs @@ -175,6 +175,8 @@ impl WireguardMonitor { let mut config = crate::config::Config::from_parameters(params, desired_mtu) .map_err(Error::WireguardConfigError)?; + let endpoint_addrs: Vec = config.peers().map(|peer| peer.endpoint.ip()).collect(); + let (close_obfs_sender, close_obfs_listener) = sync_mpsc::channel(); // Start obfuscation server and patch the WireGuard config to point the endpoint to it. let obfuscator = args @@ -191,8 +193,6 @@ impl WireguardMonitor { config.mtu = clamp_mtu(params, config.mtu); } - let endpoint_addrs: Vec = config.peers().map(|peer| peer.endpoint.ip()).collect(); - #[cfg(target_os = "windows")] let (setup_done_tx, setup_done_rx) = mpsc::channel(0); let tunnel = Self::open_tunnel(