mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 06:26:14 -05:00
feat: add hip parameter to ConnectArgs and VpnBuilder, update connection logic
This commit is contained in:
4 files changed
+52
-14
No files matched your search
@@ -36,6 +36,7 @@ pub struct ConnectArgs {
|
||||
certificate: Option<String>,
|
||||
sslkey: Option<String>,
|
||||
key_password: Option<String>,
|
||||
hip: bool,
|
||||
csd_uid: u32,
|
||||
csd_wrapper: Option<String>,
|
||||
reconnect_timeout: u32,
|
||||
@@ -54,6 +55,7 @@ impl ConnectArgs {
|
||||
certificate: None,
|
||||
sslkey: None,
|
||||
key_password: None,
|
||||
hip: false,
|
||||
csd_uid: 0,
|
||||
csd_wrapper: None,
|
||||
reconnect_timeout: 300,
|
||||
@@ -91,6 +93,10 @@ impl ConnectArgs {
|
||||
self.key_password.clone()
|
||||
}
|
||||
|
||||
pub fn hip(&self) -> bool {
|
||||
self.hip
|
||||
}
|
||||
|
||||
pub fn csd_uid(&self) -> u32 {
|
||||
self.csd_uid
|
||||
}
|
||||
@@ -135,6 +141,11 @@ impl ConnectRequest {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_hip(mut self, hip: bool) -> Self {
|
||||
self.args.hip = hip;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_csd_uid(mut self, csd_uid: u32) -> Self {
|
||||
self.args.csd_uid = csd_uid;
|
||||
self
|
||||
|
||||
Reference in new issue
Block a user