mirror of
https://github.com/warp-tech/warpgate.git
synced 2025-02-24 23:45:18 +08:00
fixed clap deprecation warnings
This commit is contained in:
parent
6342fcb3ed
commit
bd793411cb
2 changed files with 17 additions and 36 deletions
44
Cargo.lock
generated
44
Cargo.lock
generated
|
@ -1298,7 +1298,7 @@ dependencies = [
|
|||
"indexmap",
|
||||
"slab",
|
||||
"tokio",
|
||||
"tokio-util 0.7.1",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
|
@ -2304,7 +2304,7 @@ dependencies = [
|
|||
"rand",
|
||||
"regex",
|
||||
"rust-embed",
|
||||
"rustls-pemfile 1.0.0",
|
||||
"rustls-pemfile",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
|
@ -2316,7 +2316,7 @@ dependencies = [
|
|||
"tokio-rustls",
|
||||
"tokio-stream",
|
||||
"tokio-tungstenite",
|
||||
"tokio-util 0.7.1",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
|
@ -2617,9 +2617,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "reqwest"
|
||||
version = "0.11.10"
|
||||
version = "0.11.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb"
|
||||
checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"bytes",
|
||||
|
@ -2642,14 +2642,15 @@ dependencies = [
|
|||
"pin-project-lite",
|
||||
"rustls",
|
||||
"rustls-native-certs",
|
||||
"rustls-pemfile 0.3.0",
|
||||
"rustls-pemfile",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
"tokio",
|
||||
"tokio-native-tls",
|
||||
"tokio-rustls",
|
||||
"tokio-util 0.6.10",
|
||||
"tokio-util",
|
||||
"tower-service",
|
||||
"url",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
|
@ -2845,20 +2846,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50"
|
||||
dependencies = [
|
||||
"openssl-probe",
|
||||
"rustls-pemfile 1.0.0",
|
||||
"rustls-pemfile",
|
||||
"schannel",
|
||||
"security-framework",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-pemfile"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360"
|
||||
dependencies = [
|
||||
"base64",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-pemfile"
|
||||
version = "1.0.0"
|
||||
|
@ -3752,20 +3744,6 @@ dependencies = [
|
|||
"webpki",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-util"
|
||||
version = "0.6.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
"log",
|
||||
"pin-project-lite",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-util"
|
||||
version = "0.7.1"
|
||||
|
@ -3813,7 +3791,7 @@ dependencies = [
|
|||
"prost-derive",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tokio-util 0.7.1",
|
||||
"tokio-util",
|
||||
"tower",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
|
@ -3848,7 +3826,7 @@ dependencies = [
|
|||
"rand",
|
||||
"slab",
|
||||
"tokio",
|
||||
"tokio-util 0.7.1",
|
||||
"tokio-util",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
|
|
|
@ -4,7 +4,7 @@ mod config;
|
|||
mod logging;
|
||||
use crate::config::load_config;
|
||||
use anyhow::Result;
|
||||
use clap::StructOpt;
|
||||
use clap::{ArgAction, StructOpt};
|
||||
use logging::init_logging;
|
||||
use std::path::PathBuf;
|
||||
use tracing::*;
|
||||
|
@ -20,7 +20,7 @@ struct Cli {
|
|||
#[clap(subcommand)]
|
||||
command: Commands,
|
||||
|
||||
#[clap(long, short, default_value = "/etc/warpgate.yaml")]
|
||||
#[clap(long, short, default_value = "/etc/warpgate.yaml", action=ArgAction::Set)]
|
||||
config: PathBuf,
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,10 @@ enum Commands {
|
|||
/// Validate config file
|
||||
Check,
|
||||
/// Test the connection to a target host
|
||||
TestTarget { target_name: String },
|
||||
TestTarget {
|
||||
#[clap(action=ArgAction::Set)]
|
||||
target_name: String,
|
||||
},
|
||||
/// Generate a new 2FA (TOTP) enrollment key
|
||||
GenerateOtp,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue