mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-30 17:56:13 -05:00
14 lines
347 B
Rust
14 lines
347 B
Rust
use openconnect::{Vpn, VpnBuilder};
|
|
|
|
use crate::connect::ConnectHandler;
|
|
|
|
impl ConnectHandler<'_> {
|
|
pub(in crate::connect) fn vpn_builder(&self, server: &str, cookie: &str) -> anyhow::Result<VpnBuilder> {
|
|
Ok(
|
|
Vpn::builder(server, cookie)
|
|
.script(self.args.script.clone())
|
|
.script_tun(self.args.script_tun),
|
|
)
|
|
}
|
|
}
|