refactor: encrypt the sensitive data

This commit is contained in:
Kevin Yue
2023-07-22 07:33:53 +08:00
parent bf96a88e21
commit 601f422863
40 changed files with 1274 additions and 275 deletions

View File

@@ -1,5 +1,6 @@
import { Event, listen } from "@tauri-apps/api/event";
import invokeCommand from "../utils/invokeCommand";
import settingsService from "./settingsService";
type VpnStatus = "disconnected" | "connecting" | "connected" | "disconnecting";
type VpnStatusCallback = (status: VpnStatus) => void;
@@ -64,7 +65,8 @@ class VpnService {
}
async connect(server: string, cookie: string) {
return invokeCommand("vpn_connect", { server, cookie });
const { userAgent } = await settingsService.getSimulation();
return invokeCommand("vpn_connect", { server, cookie, userAgent });
}
async disconnect() {