mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 22:46:14 -05:00
Refactor using Tauri (#278)
This commit is contained in:
1 parent
edc13ed14d
commit
04a916a3e1
199 files changed
+10153
-7203
No files matched your search
@@ -0,0 +1,34 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use specta::Type;
|
||||
|
||||
use crate::gateway::Gateway;
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Type, Clone)]
|
||||
pub struct ConnectInfo {
|
||||
portal: String,
|
||||
gateway: Gateway,
|
||||
gateways: Vec<Gateway>,
|
||||
}
|
||||
|
||||
impl ConnectInfo {
|
||||
pub fn new(portal: String, gateway: Gateway, gateways: Vec<Gateway>) -> Self {
|
||||
Self {
|
||||
portal,
|
||||
gateway,
|
||||
gateways,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn gateway(&self) -> &Gateway {
|
||||
&self.gateway
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub enum VpnState {
|
||||
Disconnected,
|
||||
Connecting(Box<ConnectInfo>),
|
||||
Connected(Box<ConnectInfo>),
|
||||
Disconnecting,
|
||||
}
|
||||
Reference in new issue
Block a user