diff --git a/clients/client-core/src/config/mod.rs b/clients/client-core/src/config/mod.rs index e584619b2f..3d8c7dc3e1 100644 --- a/clients/client-core/src/config/mod.rs +++ b/clients/client-core/src/config/mod.rs @@ -345,7 +345,6 @@ pub struct Client { nym_root_directory: PathBuf, #[serde(skip)] - //super_struct: PhantomData<*const T>, super_struct: PhantomData, } diff --git a/clients/socks5/src/client/mod.rs b/clients/socks5/src/client/mod.rs index 43e13d22e1..4bbd3253b5 100644 --- a/clients/socks5/src/client/mod.rs +++ b/clients/socks5/src/client/mod.rs @@ -38,11 +38,13 @@ use crate::socks::{ pub mod config; +// Channels used to control the main task from outside pub type Socks5ControlMessageSender = mpsc::UnboundedSender; pub type Socks5ControlMessageReceiver = mpsc::UnboundedReceiver; #[derive(Debug)] pub enum Socks5ControlMessage { + /// Tell the main task to stop Stop, } @@ -281,16 +283,16 @@ impl NymClient { ); } - // Variant of `run_forever` that listends for message to shutdown + // Variant of `run_forever` that listends for remote control messages pub async fn run_and_listen(&mut self, mut receiver: Socks5ControlMessageReceiver) { self.start().await; tokio::select! { message = receiver.next() => match message { Some(Socks5ControlMessage::Stop) => { - info!("Received: {:?}", message); - info!("Shutting down"); + log::info!("Received: {:?}", message); + log::info!("Shutting down"); } - None => info!("none"), + None => log::info!("none"), } } } diff --git a/clients/socks5/src/commands/init.rs b/clients/socks5/src/commands/init.rs index 0dd0d8c29a..bc0ec0beb1 100644 --- a/clients/socks5/src/commands/init.rs +++ b/clients/socks5/src/commands/init.rs @@ -114,8 +114,6 @@ pub async fn gateway_details( validator_servers: Vec, chosen_gateway_id: Option<&str>, ) -> gateway::Node { - dbg!(&validator_servers); - dbg!(&chosen_gateway_id); let validator_api = validator_servers .choose(&mut thread_rng()) .expect("The list of validator apis is empty"); diff --git a/clients/socks5/src/commands/run.rs b/clients/socks5/src/commands/run.rs index d3811643cd..889da7e432 100644 --- a/clients/socks5/src/commands/run.rs +++ b/clients/socks5/src/commands/run.rs @@ -108,6 +108,5 @@ pub async fn execute(matches: ArgMatches<'static>) { return; } - dbg!(&config); NymClient::new(config).run_forever().await; } diff --git a/nym-connect/Cargo.lock b/nym-connect/Cargo.lock index 5368372bda..b07d07de07 100644 --- a/nym-connect/Cargo.lock +++ b/nym-connect/Cargo.lock @@ -20,15 +20,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array 0.14.4", -] - [[package]] name = "aes" version = "0.7.5" @@ -53,20 +44,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "aes-gcm" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" -dependencies = [ - "aead", - "aes 0.7.5", - "cipher 0.3.0", - "ctr 0.8.0", - "ghash", - "subtle 2.4.1", -] - [[package]] name = "ahash" version = "0.7.6" @@ -117,17 +94,6 @@ version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b26702f315f53b6071259e15dd9d64528213b44d61de1ec926eca7715d62203" -[[package]] -name = "argon2" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1574351abf0e4ef0de867b083a9f8e2f13618efcad6d3253c53554e4a887ed5" -dependencies = [ - "base64ct", - "blake2 0.10.2", - "password-hash", -] - [[package]] name = "arrayref" version = "0.3.6" @@ -313,15 +279,6 @@ dependencies = [ "opaque-debug 0.2.3", ] -[[package]] -name = "blake2" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94ba84325db59637ffc528bbe8c7f86c02c57cff5c0e2b9b00f9a851f42f309" -dependencies = [ - "digest 0.10.3", -] - [[package]] name = "blake3" version = "1.3.1" @@ -2131,16 +2088,6 @@ dependencies = [ "syn", ] -[[package]] -name = "ghash" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" -dependencies = [ - "opaque-debug 0.3.0", - "polyval", -] - [[package]] name = "gio" version = "0.15.6" @@ -3058,7 +3005,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9" dependencies = [ "arrayref", - "blake2 0.8.1", + "blake2", "chacha", "keystream", ] @@ -3435,9 +3382,6 @@ dependencies = [ name = "nym-connect" version = "1.0.0" dependencies = [ - "aes-gcm", - "argon2", - "base64", "bip39", "client-core", "config", @@ -3452,7 +3396,6 @@ dependencies = [ "rand 0.7.3", "serde", "serde_json", - "strum 0.23.0", "tauri", "tauri-build", "tauri-codegen", @@ -3463,7 +3406,6 @@ dependencies = [ "tokio", "ts-rs", "url", - "zeroize", ] [[package]] @@ -3844,17 +3786,6 @@ dependencies = [ "windows-sys 0.34.0", ] -[[package]] -name = "password-hash" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d791538a6dcc1e7cb7fe6f6b58aca40e7f79403c45b2bc274008b5e647af1d8" -dependencies = [ - "base64ct", - "rand_core 0.6.3", - "subtle 2.4.1", -] - [[package]] name = "paste" version = "1.0.6" @@ -4141,18 +4072,6 @@ dependencies = [ "miniz_oxide 0.5.1", ] -[[package]] -name = "polyval" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash", -] - [[package]] name = "ppv-lite86" version = "0.2.15" @@ -5257,7 +5176,7 @@ source = "git+https://github.com/nymtech/sphinx?rev=c494250f2a78bed33a618d470792 dependencies = [ "aes 0.7.5", "arrayref", - "blake2 0.8.1", + "blake2", "bs58", "byteorder", "chacha", @@ -5475,15 +5394,6 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aaf86bbcfd1fa9670b7a129f64fc0c9fcbbfe4f1bc4210e9e98fe71ffc12cde2" -[[package]] -name = "strum" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" -dependencies = [ - "strum_macros 0.23.1", -] - [[package]] name = "strum_macros" version = "0.21.1" @@ -5496,19 +5406,6 @@ dependencies = [ "syn", ] -[[package]] -name = "strum_macros" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38" -dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "rustversion", - "syn", -] - [[package]] name = "subtle" version = "1.0.0" @@ -5564,8 +5461,8 @@ dependencies = [ "heck 0.3.3", "itertools", "pkg-config", - "strum 0.21.0", - "strum_macros 0.21.1", + "strum", + "strum_macros", "thiserror", "toml", "version-compare 0.0.11", @@ -6350,16 +6247,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array 0.14.4", - "subtle 2.4.1", -] - [[package]] name = "untrusted" version = "0.7.1" diff --git a/nym-connect/src-tauri/Cargo.toml b/nym-connect/src-tauri/Cargo.toml index 836f745c4b..aa2ae657e0 100644 --- a/nym-connect/src-tauri/Cargo.toml +++ b/nym-connect/src-tauri/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "nym-connect" version = "1.0.0" -description = "Hrycyszyn VPN" +description = "nym-connect" authors = ["Nym Technologies SA"] license = "" repository = "" @@ -17,7 +17,6 @@ tauri-build = { version = "=1.0.0-rc.7", features = [] } tauri-codegen = "=1.0.0-rc.5" tauri-macros = "=1.0.0-rc.5" -#core-graphics = "=0.22.2" [dependencies] @@ -29,39 +28,18 @@ once_cell = "1.12" rand = "0.7" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -strum = { version = "0.23", features = ["derive"] } tauri = { version = "=1.0.0-rc.8", features = ["ayatana-tray", "shell-open", "system-tray"] } tendermint-rpc = "0.23.0" thiserror = "1.0" tokio = { version = "1.19.1", features = ["sync"] } url = "2.2" - -aes-gcm = "0.9.4" -argon2 = { version = "0.3.2", features = ["std"] } -base64 = "0.13" -zeroize = "1.4.3" - -#cosmrs = { git = "https://github.com/nymtech/cosmos-rust", branch = "bugfix/account-id-length-validation", features = ["rpc", "bip32", "cosmwasm"] } -#cosmwasm-std = "1.0.0-beta3" - -#nym-client = { path = "../../clients/native" } -client-core = { path = "../../clients/client-core" } -nym-socks5-client = { path = "../../clients/socks5" } -#nym-network-requester = { path = "../../service-providers/network-requester"} -#nymsphinx = { path = "../../common/nymsphinx" } -#validator-client = { path = "../../common/client-libs/validator-client", features = [ -# "nymd-client", -#] } -#mixnet-contract-common = { path = "../../common/cosmwasm-smart-contracts/mixnet-contract" } -config = { path = "../../common/config" } -#coconut-interface = { path = "../../common/coconut-interface" } -#credentials = { path = "../../common/credentials" } -#version-checker = { path = "../../common/version-checker" } -#network-defaults = { path = "../../common/network-defaults" } - -fix-path-env = { git = "https://github.com/tauri-apps/fix-path-env-rs", branch = "release"} log = "0.4" pretty_env_logger = "0.4.0" +fix-path-env = { git = "https://github.com/tauri-apps/fix-path-env-rs", branch = "release"} + +client-core = { path = "../../clients/client-core" } +nym-socks5-client = { path = "../../clients/socks5" } +config = { path = "../../common/config" } [dev-dependencies] ts-rs = "6.1.2" diff --git a/nym-connect/src-tauri/src/config/mod.rs b/nym-connect/src-tauri/src/config/mod.rs index cb6095c198..fa37e59865 100644 --- a/nym-connect/src-tauri/src/config/mod.rs +++ b/nym-connect/src-tauri/src/config/mod.rs @@ -89,6 +89,5 @@ pub async fn init_socks5(provider_address: &str, chosen_gateway_id: Option<&str> info!("Using gateway: {}", config.get_base().get_gateway_id(),); info!("Client configuration completed.\n\n\n"); - dbg!(&config); nym_socks5::commands::init::show_address(&config); } diff --git a/nym-connect/src-tauri/src/main.rs b/nym-connect/src-tauri/src/main.rs index a3d1003ace..fb259f15ed 100644 --- a/nym-connect/src-tauri/src/main.rs +++ b/nym-connect/src-tauri/src/main.rs @@ -61,10 +61,3 @@ fn setup_logging() { .filter_module("handlebars", log::LevelFilter::Warn) .init(); } - -#[cfg(test)] -mod test { - ts_rs::export! { - mixnet_contract_common::MixNode => "../src/types/rust/mixnode.ts", - } -}