Skip to content

Commit

Permalink
fix: Clap breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
onnovalkering committed Nov 16, 2021
1 parent 5f7bca2 commit 078050b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions socksx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -27,4 +27,4 @@ url = "2.2"

[dev-dependencies]
chacha20 = "0.7"
pin-project-lite = "0.2"
pin-project-lite = "0.2"
6 changes: 3 additions & 3 deletions socksx/examples/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -15,7 +15,7 @@ use tokio::net::{TcpListener, TcpStream};

type Handler = Arc<dyn SocksHandler + Sync + Send>;

#[derive(Clap)]
#[derive(Parser)]
#[clap(version = env!("CARGO_PKG_VERSION"))]
struct Args {
/// Host (IP) for the SOCKS server
Expand All @@ -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")]
Expand Down
6 changes: 3 additions & 3 deletions socksx/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -14,11 +14,11 @@ use tokio::time::Instant;

type Handler = Arc<dyn SocksHandler + Sync + Send>;

#[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<String>,

/// Prints debug information
Expand Down

0 comments on commit 078050b

Please sign in to comment.