mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
feat: support the --no-dtls
option
This commit is contained in:
@@ -41,6 +41,7 @@ pub struct ConnectArgs {
|
||||
reconnect_timeout: u32,
|
||||
mtu: u32,
|
||||
disable_ipv6: bool,
|
||||
no_dtls: bool,
|
||||
}
|
||||
|
||||
impl ConnectArgs {
|
||||
@@ -58,6 +59,7 @@ impl ConnectArgs {
|
||||
reconnect_timeout: 300,
|
||||
mtu: 0,
|
||||
disable_ipv6: false,
|
||||
no_dtls: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +110,10 @@ impl ConnectArgs {
|
||||
pub fn disable_ipv6(&self) -> bool {
|
||||
self.disable_ipv6
|
||||
}
|
||||
|
||||
pub fn no_dtls(&self) -> bool {
|
||||
self.no_dtls
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Type)]
|
||||
@@ -179,6 +185,11 @@ impl ConnectRequest {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_no_dtls(mut self, no_dtls: bool) -> Self {
|
||||
self.args.no_dtls = no_dtls;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn gateway(&self) -> &Gateway {
|
||||
self.info.gateway()
|
||||
}
|
||||
|
Reference in New Issue
Block a user