Skip to content

Commit

Permalink
Merge pull request #1139 from NordSecurity/dependency_updates_feb
Browse files Browse the repository at this point in the history
Bump cargo dependency versions
  • Loading branch information
tomasz-grz authored Feb 28, 2025
2 parents 924c6f2 + 4b5b394 commit 0d8a79e
Show file tree
Hide file tree
Showing 13 changed files with 255 additions and 238 deletions.
Empty file.
390 changes: 205 additions & 185 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ async-trait = "0.1"
base64 = "0.22"
bytes = "1"
cc = "1"
clap = { version = "3.1", features = ["derive"] }
clap = { version = "4.5", features = ["derive"] }
crypto_box = { version = "0.9.1", features = ["std"] }
env_logger = "0.11"
futures = "0.3.31"
Expand Down Expand Up @@ -157,7 +157,7 @@ slog = "2.7"
smart-default = "0.7.1"
sn_fake_clock = "0.4"
socket2 = "0.5"
strum = { version = "0.26", features = ["derive"] }
strum = { version = "0.27", features = ["derive"] }
surge-ping = { version = "0.8" }
thiserror = "2"
time = { version = "0.3", features = ["formatting"] }
Expand All @@ -166,9 +166,9 @@ tracing-subscriber = { version = "0.3", features = ["local-time", "env-filter"]
tracing-appender = "0.2"
uniffi = { git = "https://github.com/NordSecurity/uniffi-rs.git", tag = "v0.3.1+v0.25.0" }
url = "2.5"
uuid = { version = "1.1", features = ["v4"] }
uuid = { version = "1.14", features = ["v4"] }
winapi = { version = "0.3", features = ["netioapi", "ws2def"] }
windows = { version = "0.59", features = [
windows = { version = "0.60", features = [
"Win32_Networking_WinSock",
"Win32_NetworkManagement_IpHelper",
] }
Expand Down
1 change: 0 additions & 1 deletion clis/derpcli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ base64.workspace = true
clap.workspace = true
crypto_box.workspace = true
futures.workspace = true
parking_lot.workspace = true
rand.workspace = true
serde.workspace = true
serde_json.workspace = true
Expand Down
68 changes: 36 additions & 32 deletions clis/derpcli/src/conf.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::anyhow;
use base64::prelude::*;
use clap::{Arg, Command};
use clap::{Arg, ArgAction, Command};
use crypto_box::PublicKey as BoxPublicKey;
use serde::Deserialize;
use std::{
Expand Down Expand Up @@ -149,7 +149,7 @@ impl Config {
Arg::new("server")
.help("Server address")
.required(false)
.takes_value(true)
.num_args(1)
.long("server")
.default_value("http://localhost:1234")
.short('s'),
Expand All @@ -165,23 +165,23 @@ impl Config {
Arg::new("mykey")
.help("My private key base64 encoded")
.required(false)
.takes_value(true)
.num_args(1)
.long("mykey")
.short('m'),
)
.arg(
Arg::new("targetkey")
.help("Target peer private key base64 encoded")
.required(false)
.takes_value(true)
.num_args(1)
.long("targetkey")
.short('k'),
)
.arg(
Arg::new("count")
.help("Count of iterations to run")
.required(false)
.takes_value(true)
.num_args(1)
.long("count")
.default_value("3")
.short('c'),
Expand All @@ -197,7 +197,7 @@ impl Config {
Arg::new("delay")
.help("Delay ms between iterations")
.required(false)
.takes_value(true)
.num_args(1)
.long("delay")
.default_value("100")
.short('d'),
Expand All @@ -206,7 +206,7 @@ impl Config {
Arg::new("data")
.help("Data text to send, <to be implemented>")
.required(false)
.takes_value(true)
.num_args(1)
.long("data")
.default_value("hello derp!")
.short('a'),
Expand All @@ -215,31 +215,31 @@ impl Config {
Arg::new("size")
.help("Data text size to generate and send")
.required(false)
.takes_value(true)
.num_args(1)
.long("size")
.short('z'),
)
.arg(
Arg::new("verbose")
.help("Verbose output (can use multiple)")
.required(false)
.multiple_occurrences(true)
.action(ArgAction::Count)
.long("verbose")
.short('v'),
)
.arg(
Arg::new("config")
.help("Path to config file")
.required(false)
.takes_value(true)
.num_args(1)
.long("config")
.short('f'),
)
.arg(
Arg::new("output")
.help("Path to logs output file")
.required(false)
.takes_value(true)
.num_args(1)
.default_value("")
.long("output")
.short('o'),
Expand All @@ -254,38 +254,42 @@ impl Config {

// parse command line params
let server_addr = matches
.value_of("server")
.unwrap_or("http://localhost:3340")
.to_string();
.get_one::<String>("server")
.cloned()
.unwrap_or("http://localhost:3340".into());

let is_target = matches.is_present("target");
let is_target = matches.contains_id("target");

let count = matches
.value_of("count")
.unwrap_or("3")
.parse::<i32>()
.get_one::<String>("count")
.and_then(|v| v.parse::<i32>().ok())
.unwrap_or(3);

let delay = matches
.value_of("delay")
.unwrap_or("100")
.parse::<u64>()
.get_one::<String>("delay")
.and_then(|v| v.parse::<u64>().ok())
.unwrap_or(100);

let data_str = matches.value_of("data").unwrap_or("hello derp!");
let data_str = matches
.get_one("data")
.map_or("hello derp!", String::as_str);

let data_size = matches
.value_of("size")
.unwrap_or_default()
.parse::<u16>()
.get_one::<String>("size")
.and_then(|v| v.parse::<u16>().ok())
.unwrap_or_default();

let stress_cfg_path = matches.value_of("config").unwrap_or_default().to_string();
let stress_cfg_path = matches
.get_one::<String>("config")
.cloned()
.unwrap_or_default();

// keys for peer identification in manual mode
let mut secret_key1 = [0_u8; KEY_SIZE];
let mut secret_key2 = [1_u8; KEY_SIZE];

let mykey_str = matches.value_of("mykey").unwrap_or("");
let targetkey_str = matches.value_of("targetkey").unwrap_or("");
let mykey_str = matches.get_one("mykey").map_or("", String::as_str);
let targetkey_str = matches.get_one("targetkey").map_or("", String::as_str);

// check if my private key is given as param
if mykey_str.chars().count() > 0 {
Expand Down Expand Up @@ -328,13 +332,13 @@ impl Config {
target_key: SecretKey::new(secret_key2),
send_count: count,
send_delay: Duration::from_millis(if delay > 5000 { 5000 } else { delay }),
send_loop: matches.is_present("loop"),
send_loop: matches.contains_id("loop"),
send_data: data_str.to_owned(),
send_size: if data_size > 8000 { 8000 } else { data_size },
send_size_enabled: matches.is_present("size"),
verbose: matches.occurrences_of("verbose"),
send_size_enabled: matches.contains_id("size"),
verbose: matches.get_count("verbose") as u64,
stress_cfg_path: Path::new(&stress_cfg_path).to_path_buf(),
use_built_in_root_certificates: matches.is_present("use_built_in_root_certificates"),
use_built_in_root_certificates: matches.contains_id("use_built_in_root_certificates"),
})
}

Expand Down
5 changes: 1 addition & 4 deletions clis/interderpcli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ license = "GPL-3.0-only"
repository = "https://github.com/NordSecurity/libtelio"

[dependencies]
clap = { version = "4.5.26", features = ["std", "derive"], default-features = false }
clap.workspace = true
ring = { default-features = false, version = "0.17.5" }

anyhow.workspace = true
base64.workspace = true
crypto_box.workspace = true
futures.workspace = true
itertools.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions clis/tcli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub enum Error {
Nord(#[from] NordError),

#[error("bad command: {0:?}.")]
Parser(clap::ErrorKind),
Parser(clap::error::ErrorKind),

#[error(transparent)]
Serde(#[from] serde_json::Error),
Expand Down Expand Up @@ -198,7 +198,7 @@ enum LoginCmd {
enum DevCmd {
Start {
/// Select adapter type to run
#[clap(possible_values = &["neptun", "wireguard-go", "wireguard-nt", "linux-native", ""], default_value ="")]
#[clap(value_parser = ["neptun", "wireguard-go", "wireguard-nt", "linux-native", ""], default_value ="")]
adapter: String,
/// Name of device
#[clap(default_value = DEFAULT_TUNNEL_NAME)]
Expand Down Expand Up @@ -254,7 +254,7 @@ enum MeshCmd {
/// Turn mesnet on
On {
name: String,
#[clap(possible_values = &["neptun", "wireguard-go", "wireguard-nt", "linux-native", ""], default_value ="")]
#[clap(value_parser = ["neptun", "wireguard-go", "wireguard-nt", "linux-native", ""], default_value ="")]
adapter: String,
},
/// Set own meshnet ip address for the adapter
Expand Down
2 changes: 1 addition & 1 deletion clis/teliod/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ base64 = "0.22.1"
dirs = "6.0.0"

form_urlencoded = { version = "1.2.1", optional = true }
maud = { version = "0.26.0", optional = true }
maud = { version = "0.27.0", optional = true }
lazy_static = { workspace = true, optional = true}
const_format = { version = "0.2.33", optional = true }
rust-cgi = { version = "0.7.1", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/telio-model/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ publish = false
pretend_to_be_macos = []

[dependencies]
strum_macros = "0.26"
strum_macros = "0.27"

ipnet.workspace = true
itertools.workspace = true
Expand Down
5 changes: 1 addition & 4 deletions crates/telio-network-monitors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ neli = { version = "0.6.3", features = ["async"] }

[target.'cfg(windows)'.dependencies]
winapi = { workspace = true, features = ["iphlpapi", "netioapi", "winnt", "ws2def"] }
windows = { version = "0.59.0", features = [
"Win32_Networking_WinSock",
"Win32_NetworkManagement_IpHelper",
] }
windows.workspace = true

[dev-dependencies]
assert_matches = "1.5.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/telio-relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository = "https://github.com/NordSecurity/libtelio"
publish = false

[dependencies]
rand_core = { version = "0.6.3", default-features = false }
rand_core = { version = "0.6.4", default-features = false }
tokio-rustls = { version = "0.26.1", default-features = false }
tokio-util = "0.7.3"
tokio-stream = { default-features = false, version = "0.1.9" }
Expand Down
2 changes: 1 addition & 1 deletion crates/telio-traversal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ publish = false
bytecodec = "0.4.15"
enum-map = "2.5.0"
igd = { git = "https://github.com/NordSecurity/rust-igd.git", tag = "v0.13.1", features = ["aio"], default-features = false }
stun_codec = "0.1.13"
stun_codec = "0.3"

async-trait.workspace = true
base64.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/telio-wg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test-adapter = []

[dependencies]
slog-stdlog = "4.1.0"
wireguard-uapi = { version = "2.0.4", features = ["xplatform"], default-features = false }
wireguard-uapi = { version = "2.0.5", features = ["xplatform"], default-features = false }

async-trait.workspace = true
neptun.workspace = true
Expand Down

0 comments on commit 0d8a79e

Please sign in to comment.