From 075693975376be05d228bc45b321b1f6d08021cd Mon Sep 17 00:00:00 2001 From: remgodow Date: Thu, 10 Sep 2020 18:52:30 +0200 Subject: feat(platform): windows build and run support (#180) * Remove connections vector from OpenSockets, use common OpenSockets implementation based on sysinfo and netstat2. * Replace termion backend with crossterm, which works on Windows as well. * More fixes for windows build. * Remove tui default-features (termion), update unit tests for crossterm. * Windows compilation fixes. * Remove unused get_open_sockets implementations for linux and mac. Fix formatting. * Add build.rs for windows to download and extract Packet.lib from npcap SDK. * Resolve Cargo.lock after merging main. * fix(tests): adjust snapshots new location of the dns resolution * style(clippy): clippy * style(clippy): remove dead code * style(clippy): use write_all in build.rs * style(clippy): remove unused import added by Intellij * style(review): use String instead of str * fix(build): run build.rs only once * fix(regression): skip iface_is_up() filter only for Windows * fix(review): restore per os implementation of get_open_sockets() * fix(cargo): add missing os specific packages * fix: conditional compilation of windows module * fix: compilation errors * fix: missing Protocol::from_str() implementation * style(clippy): remove unused methods Co-authored-by: Aram Drevekenin --- Cargo.toml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 11559a3..b635457 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,6 +34,10 @@ trust-dns-resolver = "0.18.1" async-trait = "0.1.21" unicode-width = "0.1.8" +[target.'cfg(target_os="windows")'.dependencies] +netstat2 = "0.9.0" +sysinfo = "0.15.1" + [target.'cfg(target_os="linux")'.dependencies] procfs = "0.7.4" @@ -43,3 +47,8 @@ pnet_base = "0.26.0" cargo-insta = "0.11.0" packet-builder = "0.5.0" regex = "1" + +[build-dependencies] +#[target.'cfg(target_os="windows")'.build-dependencies] +http_req = "0.7.0" +zip = "0.5.6" -- cgit v1.2.3