diff --git a/socksx/Cargo.toml b/socksx/Cargo.toml index 1b5eff4..33a8811 100644 --- a/socksx/Cargo.toml +++ b/socksx/Cargo.toml @@ -10,7 +10,7 @@ license = "MIT" anyhow = "1" async-trait = "0.1" bytes = "1" -clap = "3.0.0-beta.2" +clap = "3.0.0-beta.5" dotenv = "0.15" env_logger = "0.8" futures = "0.3" @@ -27,4 +27,4 @@ url = "2.2" [dev-dependencies] chacha20 = "0.7" -pin-project-lite = "0.2" \ No newline at end of file +pin-project-lite = "0.2" diff --git a/socksx/examples/functions.rs b/socksx/examples/functions.rs index 99f7416..9519c5c 100644 --- a/socksx/examples/functions.rs +++ b/socksx/examples/functions.rs @@ -2,7 +2,7 @@ use anyhow::Result; use bytes::BytesMut; use chacha20::cipher::{NewCipher, StreamCipher}; use chacha20::{ChaCha20, Key, Nonce}; -use clap::Clap; +use clap::Parser; use dotenv::dotenv; use pin_project_lite::pin_project; use socksx::{self, Socks5Handler, Socks6Handler, SocksHandler}; @@ -15,7 +15,7 @@ use tokio::net::{TcpListener, TcpStream}; type Handler = Arc; -#[derive(Clap)] +#[derive(Parser)] #[clap(version = env!("CARGO_PKG_VERSION"))] struct Args { /// Host (IP) for the SOCKS server @@ -34,7 +34,7 @@ struct Args { function: Function, } -#[derive(Clap, Clone)] +#[derive(Parser, Clone)] enum Function { /// Apply ChaCha20 encryption/decryption to ingress traffic #[clap(name = "chacha20")] diff --git a/socksx/src/main.rs b/socksx/src/main.rs index 0dd109a..16fd7fd 100644 --- a/socksx/src/main.rs +++ b/socksx/src/main.rs @@ -2,7 +2,7 @@ extern crate human_panic; use anyhow::Result; -use clap::Clap; +use clap::Parser; use dotenv::dotenv; use itertools::Itertools; use log::LevelFilter; @@ -14,11 +14,11 @@ use tokio::time::Instant; type Handler = Arc; -#[derive(Clap)] +#[derive(Parser)] #[clap(version = env!("CARGO_PKG_VERSION"))] struct Args { /// Entry in the proxy chain, the order is preserved - #[clap(short, long, env = "CHAIN", multiple = true)] + #[clap(short, long, env = "CHAIN", multiple_occurrences = true)] chain: Vec, /// Prints debug information