diff options
| author | Joakim Hulthe <joakim@hulthe.net> | 2025-05-06 14:02:53 +0200 |
|---|---|---|
| committer | Joakim Hulthe <joakim.hulthe@mullvad.net> | 2025-05-14 18:00:30 +0200 |
| commit | d3224d3d9269f60e718bd53ebe62f5257ded1cd0 (patch) | |
| tree | b4f660d01be17363350722770d5d716204604ffa | |
| parent | 3c046f8ccda41a95f4495e7147c7c09842b7c5bd (diff) | |
| download | mullvadvpn-d3224d3d9269f60e718bd53ebe62f5257ded1cd0.tar.xz mullvadvpn-d3224d3d9269f60e718bd53ebe62f5257ded1cd0.zip | |
Add some comments to talpid-wireguard
| -rw-r--r-- | talpid-wireguard/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/talpid-wireguard/src/lib.rs b/talpid-wireguard/src/lib.rs index 6144e78a0d..308d8c335b 100644 --- a/talpid-wireguard/src/lib.rs +++ b/talpid-wireguard/src/lib.rs @@ -882,15 +882,20 @@ impl WireguardMonitor { iface_name: &str, config: &'a Config, ) -> impl Iterator<Item = RequiredRoute> + 'a { + // e.g. utun4 let gateway_node = talpid_routing::Node::device(iface_name.to_string()); + + // e.g. route to 10.64.0.1 through utun4 let gateway_routes = std::iter::once(RequiredRoute::new( ipnetwork::Ipv4Network::from(config.ipv4_gateway).into(), gateway_node.clone(), )) + // same but ipv6 .chain(config.ipv6_gateway.map(|gateway| { RequiredRoute::new(ipnetwork::Ipv6Network::from(gateway).into(), gateway_node) })); + // e.g. utun4 and utun4 let (node_v4, node_v6) = Self::get_tunnel_nodes(iface_name, config); #[cfg(any(target_os = "linux", target_os = "macos"))] |
