Skip to content

Commit

Permalink
Fix endpoint addr route
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Oct 24, 2024
1 parent d9e7837 commit f67aca5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions talpid-wireguard/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<IpAddr> = 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
Expand All @@ -191,8 +193,6 @@ impl WireguardMonitor {
config.mtu = clamp_mtu(params, config.mtu);
}

let endpoint_addrs: Vec<IpAddr> = 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(
Expand Down

0 comments on commit f67aca5

Please sign in to comment.