feat: add hip parameter to ConnectArgs and VpnBuilder, update connection logic

This commit is contained in:
Kevin Yue committed 2025-11-12 23:35:44 +08:00
1 parent 49fe7447ff
commit 603975bfe0
4 files changed
+52 -14

No files matched your search

+11
View File
@@ -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