mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Update format
This commit is contained in:
@@ -9,12 +9,7 @@ use crate::{
|
||||
launch_gui::{LaunchGuiArgs, LaunchGuiHandler},
|
||||
};
|
||||
|
||||
const VERSION: &str = concat!(
|
||||
env!("CARGO_PKG_VERSION"),
|
||||
" (",
|
||||
compile_time::date_str!(),
|
||||
")"
|
||||
);
|
||||
const VERSION: &str = concat!(env!("CARGO_PKG_VERSION"), " (", compile_time::date_str!(), ")");
|
||||
|
||||
pub(crate) struct SharedArgs {
|
||||
pub(crate) fix_openssl: bool,
|
||||
@@ -53,10 +48,7 @@ struct Cli {
|
||||
#[command(subcommand)]
|
||||
command: CliCommand,
|
||||
|
||||
#[arg(
|
||||
long,
|
||||
help = "Get around the OpenSSL `unsafe legacy renegotiation` error"
|
||||
)]
|
||||
#[arg(long, help = "Get around the OpenSSL `unsafe legacy renegotiation` error")]
|
||||
fix_openssl: bool,
|
||||
#[arg(long, help = "Ignore the TLS errors")]
|
||||
ignore_tls_errors: bool,
|
||||
|
@@ -21,17 +21,9 @@ use crate::{cli::SharedArgs, GP_CLIENT_LOCK_FILE};
|
||||
pub(crate) struct ConnectArgs {
|
||||
#[arg(help = "The portal server to connect to")]
|
||||
server: String,
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
help = "The gateway to connect to, it will prompt if not specified"
|
||||
)]
|
||||
#[arg(short, long, help = "The gateway to connect to, it will prompt if not specified")]
|
||||
gateway: Option<String>,
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
help = "The username to use, it will prompt if not specified"
|
||||
)]
|
||||
#[arg(short, long, help = "The username to use, it will prompt if not specified")]
|
||||
user: Option<String>,
|
||||
#[arg(long, short, help = "The VPNC script to use")]
|
||||
script: Option<String>,
|
||||
@@ -174,11 +166,7 @@ impl<'a> ConnectHandler<'a> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn obtain_credential(
|
||||
&self,
|
||||
prelogin: &Prelogin,
|
||||
server: &str,
|
||||
) -> anyhow::Result<Credential> {
|
||||
async fn obtain_credential(&self, prelogin: &Prelogin, server: &str) -> anyhow::Result<Credential> {
|
||||
let is_gateway = prelogin.is_gateway();
|
||||
|
||||
match prelogin {
|
||||
|
Reference in New Issue
Block a user