mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
feat: gpauth support Windows
This commit is contained in:
@@ -27,7 +27,7 @@ chacha20poly1305 = { version = "0.10", features = ["std"] }
|
||||
redact-engine.workspace = true
|
||||
url.workspace = true
|
||||
regex.workspace = true
|
||||
uzers.workspace = true
|
||||
|
||||
serde_urlencoded.workspace = true
|
||||
md5.workspace = true
|
||||
sha256.workspace = true
|
||||
@@ -39,6 +39,9 @@ clap-verbosity-flag = { workspace = true, optional = true }
|
||||
env_logger = { workspace = true, optional = true }
|
||||
log-reload = { version = "0.1", optional = true }
|
||||
|
||||
[target.'cfg(target_family="unix")'.dependencies]
|
||||
uzers.workspace = true
|
||||
|
||||
[features]
|
||||
tauri = ["dep:tauri"]
|
||||
clap = ["dep:clap", "dep:clap-verbosity-flag"]
|
||||
|
@@ -104,7 +104,7 @@ impl SamlAuthData {
|
||||
}
|
||||
|
||||
let auth_data = decode_to_string(auth_data).map_err(|e| {
|
||||
warn!("Failed to decode SAML auth data: {}", e);
|
||||
warn!("Failed to decode SAML auth data: {}", auth_data);
|
||||
AuthDataParseError::Invalid(anyhow::anyhow!(e))
|
||||
})?;
|
||||
let auth_data = Self::from_html(&auth_data)?;
|
||||
|
@@ -1,5 +1,7 @@
|
||||
mod login;
|
||||
mod parse_gateways;
|
||||
|
||||
#[cfg(unix)]
|
||||
pub mod hip;
|
||||
|
||||
pub use login::*;
|
||||
|
@@ -4,7 +4,10 @@ pub mod error;
|
||||
pub mod gateway;
|
||||
pub mod gp_params;
|
||||
pub mod portal;
|
||||
|
||||
#[cfg(unix)]
|
||||
pub mod process;
|
||||
|
||||
pub mod service;
|
||||
pub mod utils;
|
||||
|
||||
|
@@ -1,8 +1,11 @@
|
||||
pub(crate) mod command_traits;
|
||||
|
||||
pub(crate) mod gui_helper_launcher;
|
||||
|
||||
pub mod auth_launcher;
|
||||
pub mod gui_launcher;
|
||||
pub mod hip_launcher;
|
||||
pub mod service_launcher;
|
||||
|
||||
#[cfg(unix)]
|
||||
pub mod users;
|
||||
|
@@ -9,7 +9,7 @@ pub mod lock_file;
|
||||
pub mod openssl;
|
||||
pub mod redact;
|
||||
pub mod request;
|
||||
#[cfg(feature = "tauri")]
|
||||
#[cfg(all(feature = "tauri", not(any(target_os = "macos", target_os = "windows"))))]
|
||||
pub mod window;
|
||||
|
||||
mod shutdown_signal;
|
||||
|
@@ -6,15 +6,21 @@ pub async fn shutdown_signal() {
|
||||
};
|
||||
|
||||
#[cfg(unix)]
|
||||
let terminate = async {
|
||||
signal::unix::signal(signal::unix::SignalKind::terminate())
|
||||
.expect("failed to install signal handler")
|
||||
.recv()
|
||||
.await;
|
||||
};
|
||||
{
|
||||
let terminate = async {
|
||||
signal::unix::signal(signal::unix::SignalKind::terminate())
|
||||
.expect("failed to install signal handler")
|
||||
.recv()
|
||||
.await;
|
||||
};
|
||||
tokio::select! {
|
||||
_ = ctrl_c => {},
|
||||
_ = terminate => {},
|
||||
}
|
||||
}
|
||||
|
||||
tokio::select! {
|
||||
_ = ctrl_c => {},
|
||||
_ = terminate => {},
|
||||
#[cfg(not(unix))]
|
||||
{
|
||||
ctrl_c.await;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user