feat: support the --no-dtls option

This commit is contained in:
Kevin Yue
2024-08-13 20:41:33 +08:00
parent c578e35178
commit c2a6a436a5
8 changed files with 31 additions and 1 deletions

View File

@@ -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()
}