diff --git a/apps/gpclient/src/connect.rs b/apps/gpclient/src/connect.rs index 62ed2af..212037a 100644 --- a/apps/gpclient/src/connect.rs +++ b/apps/gpclient/src/connect.rs @@ -32,6 +32,8 @@ pub(crate) struct ConnectArgs { user: Option, #[arg(long, short, help = "The VPNC script to use")] script: Option, + #[arg(long, help = "Treat the server as a gateway, instead of a portal")] + as_gateway: bool, #[arg( long, @@ -95,6 +97,12 @@ impl<'a> ConnectHandler<'a> { pub(crate) async fn handle(&self) -> anyhow::Result<()> { let server = self.args.server.as_str(); + let as_gateway = self.args.as_gateway; + + if as_gateway { + info!("Treating the server as a gateway"); + return self.connect_gateway_with_prelogin(server).await; + } let Err(err) = self.connect_portal_with_prelogin(server).await else { return Ok(());