mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
Add message for the '--as-gateway' option
This commit is contained in:
parent
e9cb253be1
commit
879b977321
@ -111,11 +111,16 @@ impl<'a> ConnectHandler<'a> {
|
|||||||
info!("Failed to connect portal with prelogin: {}", err);
|
info!("Failed to connect portal with prelogin: {}", err);
|
||||||
if err.root_cause().downcast_ref::<PortalError>().is_some() {
|
if err.root_cause().downcast_ref::<PortalError>().is_some() {
|
||||||
info!("Trying the gateway authentication workflow...");
|
info!("Trying the gateway authentication workflow...");
|
||||||
return self.connect_gateway_with_prelogin(server).await;
|
self.connect_gateway_with_prelogin(server).await?;
|
||||||
}
|
|
||||||
|
|
||||||
|
eprintln!("\nNOTE: the server may be a gateway, not a portal.");
|
||||||
|
eprintln!("NOTE: try to use the `--as-gateway` option if you were authenticated twice.");
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
} else {
|
||||||
Err(err)
|
Err(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async fn connect_portal_with_prelogin(&self, portal: &str) -> anyhow::Result<()> {
|
async fn connect_portal_with_prelogin(&self, portal: &str) -> anyhow::Result<()> {
|
||||||
let gp_params = self.build_gp_params();
|
let gp_params = self.build_gp_params();
|
||||||
|
Loading…
Reference in New Issue
Block a user