mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Add mtu option
This commit is contained in:
@@ -34,6 +34,7 @@ pub struct ConnectArgs {
|
||||
user_agent: Option<String>,
|
||||
csd_uid: u32,
|
||||
csd_wrapper: Option<String>,
|
||||
mtu: u32,
|
||||
os: Option<ClientOs>,
|
||||
}
|
||||
|
||||
@@ -46,6 +47,7 @@ impl ConnectArgs {
|
||||
os: None,
|
||||
csd_uid: 0,
|
||||
csd_wrapper: None,
|
||||
mtu: 0,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +74,10 @@ impl ConnectArgs {
|
||||
pub fn csd_wrapper(&self) -> Option<String> {
|
||||
self.csd_wrapper.clone()
|
||||
}
|
||||
|
||||
pub fn mtu(&self) -> u32 {
|
||||
self.mtu
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Type)]
|
||||
@@ -103,6 +109,11 @@ impl ConnectRequest {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_mtu(mut self, mtu: u32) -> Self {
|
||||
self.args.mtu = mtu;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_user_agent<T: Into<Option<String>>>(mut self, user_agent: T) -> Self {
|
||||
self.args.user_agent = user_agent.into();
|
||||
self
|
||||
|
Reference in New Issue
Block a user