mirror of
				https://github.com/yuezk/GlobalProtect-openconnect.git
				synced 2025-05-20 07:26:58 -04:00 
			
		
		
		
	Add message for the '--as-gateway' option
This commit is contained in:
		@@ -111,10 +111,15 @@ 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?;
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Err(err)
 | 
					      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)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  async fn connect_portal_with_prelogin(&self, portal: &str) -> anyhow::Result<()> {
 | 
					  async fn connect_portal_with_prelogin(&self, portal: &str) -> anyhow::Result<()> {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user