mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Support connect gateway (#306)
This commit is contained in:
@@ -284,12 +284,10 @@ fn raise_window(window: &Arc<Window>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) async fn portal_prelogin(portal: &str, gp_params: &GpParams) -> anyhow::Result<String> {
|
||||
info!("Portal prelogin...");
|
||||
|
||||
pub async fn portal_prelogin(portal: &str, gp_params: &GpParams) -> anyhow::Result<String> {
|
||||
match prelogin(portal, gp_params).await? {
|
||||
Prelogin::Saml(prelogin) => Ok(prelogin.saml_request().to_string()),
|
||||
Prelogin::Standard(_) => Err(anyhow::anyhow!("Received non-SAML prelogin response")),
|
||||
Prelogin::Standard(_) => bail!("Received non-SAML prelogin response"),
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -25,6 +25,8 @@ const VERSION: &str = concat!(
|
||||
struct Cli {
|
||||
server: String,
|
||||
#[arg(long)]
|
||||
gateway: bool,
|
||||
#[arg(long)]
|
||||
saml_request: Option<String>,
|
||||
#[arg(long, default_value = GP_USER_AGENT)]
|
||||
user_agent: String,
|
||||
@@ -102,6 +104,7 @@ impl Cli {
|
||||
.client_os(ClientOs::from(&self.os))
|
||||
.os_version(self.os_version.clone())
|
||||
.ignore_tls_errors(self.ignore_tls_errors)
|
||||
.is_gateway(self.gateway)
|
||||
.build();
|
||||
|
||||
gp_params
|
||||
|
Reference in New Issue
Block a user