mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 06:26:14 -05:00
feat: add the -i/--interface option (#512)
This commit is contained in:
1 parent
ea9819d161
commit
c1ab26aef3
5 files changed
+19
-1
No files matched your search
@@ -44,6 +44,9 @@ pub(crate) struct ConnectArgs {
|
||||
#[arg(long, short, help = "The VPNC script to use")]
|
||||
script: Option<String>,
|
||||
|
||||
#[arg(long, short, help = "The IFNAME for tunnel interface")]
|
||||
interface: Option<String>,
|
||||
|
||||
#[arg(long, help = "Connect the server as a gateway, instead of a portal")]
|
||||
as_gateway: bool,
|
||||
|
||||
@@ -313,6 +316,7 @@ impl<'a> ConnectHandler<'a> {
|
||||
let os = ClientOs::from(&self.args.os).to_openconnect_os().to_string();
|
||||
let vpn = Vpn::builder(gateway, cookie)
|
||||
.script(self.args.script.clone())
|
||||
.interface(self.args.interface.clone())
|
||||
.user_agent(self.args.user_agent.clone())
|
||||
.os(Some(os))
|
||||
.certificate(self.args.certificate.clone())
|
||||
|
||||
Reference in new issue
Block a user