mirror of
				https://github.com/yuezk/GlobalProtect-openconnect.git
				synced 2025-05-20 07:26:58 -04:00 
			
		
		
		
	feat: add the --reconnect-timeout option
				
					
				
			This commit is contained in:
		| @@ -32,10 +32,11 @@ pub struct ConnectArgs { | ||||
|   cookie: String, | ||||
|   vpnc_script: Option<String>, | ||||
|   user_agent: Option<String>, | ||||
|   os: Option<ClientOs>, | ||||
|   csd_uid: u32, | ||||
|   csd_wrapper: Option<String>, | ||||
|   reconnect_timeout: u32, | ||||
|   mtu: u32, | ||||
|   os: Option<ClientOs>, | ||||
|   disable_ipv6: bool, | ||||
| } | ||||
|  | ||||
| @@ -48,6 +49,7 @@ impl ConnectArgs { | ||||
|       os: None, | ||||
|       csd_uid: 0, | ||||
|       csd_wrapper: None, | ||||
|       reconnect_timeout: 300, | ||||
|       mtu: 0, | ||||
|       disable_ipv6: false, | ||||
|     } | ||||
| @@ -77,6 +79,10 @@ impl ConnectArgs { | ||||
|     self.csd_wrapper.clone() | ||||
|   } | ||||
|  | ||||
|   pub fn reconnect_timeout(&self) -> u32 { | ||||
|     self.reconnect_timeout | ||||
|   } | ||||
|  | ||||
|   pub fn mtu(&self) -> u32 { | ||||
|     self.mtu | ||||
|   } | ||||
| @@ -125,6 +131,11 @@ impl ConnectRequest { | ||||
|     self | ||||
|   } | ||||
|  | ||||
|   pub fn with_reconnect_timeout(mut self, reconnect_timeout: u32) -> Self { | ||||
|     self.args.reconnect_timeout = reconnect_timeout; | ||||
|     self | ||||
|   } | ||||
|  | ||||
|   pub fn with_mtu(mut self, mtu: u32) -> Self { | ||||
|     self.args.mtu = mtu; | ||||
|     self | ||||
|   | ||||
		Reference in New Issue
	
	Block a user