diff --git a/Cargo.toml b/Cargo.toml index 932140a..8de8f7c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "vopono" description = "Launch applications via VPN tunnels using temporary network namespaces" -version = "0.8.2" +version = "0.8.3" authors = ["James McMurray "] edition = "2018" license = "GPL-3.0-or-later" @@ -20,7 +20,7 @@ pretty_env_logger = "0.4" clap = "2" which = "4" users = "0.11" -nix = "0.21" +nix = "0.22" serde = {version = "1", features = ["derive", "std"]} csv = "1" dialoguer ="0.8" @@ -34,7 +34,7 @@ chrono = "0.4" compound_duration = "1" ipnet = {version = "2", features = ["serde"]} reqwest = {default-features = false, version = "0.11", features = ["blocking", "json", "rustls-tls"]} -sysinfo = "0.18" +sysinfo = "0.19" base64 = "0.13" x25519-dalek = "1" strum = "0.21" diff --git a/src/netns.rs b/src/netns.rs index fa8c5c5..3f4618e 100644 --- a/src/netns.rs +++ b/src/netns.rs @@ -455,6 +455,7 @@ impl Drop for NetworkNamespace { std::mem::forget(self.firewall_exception.take()); std::mem::forget(self.host_masquerade.take()); std::mem::forget(self.openconnect.take()); + std::mem::forget(self.openfortivpn.take()); } } } diff --git a/src/util/mod.rs b/src/util/mod.rs index 896aac7..565057e 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -149,17 +149,17 @@ pub fn get_existing_namespaces() -> anyhow::Result> { pub fn check_process_running(pid: u32) -> bool { let s = System::new_with_specifics(RefreshKind::new().with_processes()); - s.get_process(pid as i32).is_some() + s.process(pid as i32).is_some() } pub fn get_all_running_pids() -> Vec { let s = System::new_with_specifics(RefreshKind::new().with_processes()); - s.get_processes().keys().map(|x| *x as u32).collect() + s.processes().keys().map(|x| *x as u32).collect() } pub fn get_all_running_process_names() -> Vec { let s = System::new_with_specifics(RefreshKind::new().with_processes()); - s.get_processes() + s.processes() .values() .map(|x| x.name().to_string()) .collect()