mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-18 22:16:18 -05:00
feat: install trusted VPN scripts
This commit is contained in:
23 files changed
+454
-11
No files matched your search
@@ -3,6 +3,8 @@ use std::{
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
|
||||
use crate::constants::GP_VPNC_SCRIPT_INSTALLER_BINARY;
|
||||
use crate::constants::{GP_AUTH_BINARY, GP_CLIENT_BINARY, GP_GUI_BINARY, GP_GUI_HELPER_BINARY, GP_SERVICE_BINARY};
|
||||
|
||||
pub fn gpclient() -> PathBuf {
|
||||
@@ -13,6 +15,15 @@ pub fn gpservice() -> PathBuf {
|
||||
resolve("GP_SERVICE_BINARY", "gpservice", GP_SERVICE_BINARY)
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
|
||||
pub fn gp_vpnc_script_installer() -> PathBuf {
|
||||
resolve(
|
||||
"GP_VPNC_SCRIPT_INSTALLER_BINARY",
|
||||
"gp-vpnc-script-installer",
|
||||
GP_VPNC_SCRIPT_INSTALLER_BINARY,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn gpauth() -> PathBuf {
|
||||
resolve("GP_AUTH_BINARY", "gpauth", GP_AUTH_BINARY)
|
||||
}
|
||||
|
||||
@@ -3,6 +3,15 @@ pub const GP_CLIENT_VERSION_LINUX: &str = "6.3.3-619";
|
||||
pub const GP_CLIENT_VERSION_WINDOWS: &str = "6.3.3-650";
|
||||
pub const GP_CLIENT_VERSION_MACOS: &str = "6.3.3-915";
|
||||
pub const GP_SERVICE_LOCK_FILE: &str = "/var/run/gpservice.lock";
|
||||
#[cfg(target_os = "linux")]
|
||||
pub const GP_VPNC_SCRIPT_INSTALLER_BINARY: &str = "/usr/libexec/gpclient/gp-vpnc-script-installer";
|
||||
#[cfg(target_os = "linux")]
|
||||
pub const INSTALLED_VPNC_SCRIPT: &str = "/var/lib/gpclient/scripts/vpnc-script";
|
||||
#[cfg(any(target_os = "freebsd", target_os = "openbsd"))]
|
||||
pub const GP_VPNC_SCRIPT_INSTALLER_BINARY: &str = "/usr/local/libexec/gpclient/gp-vpnc-script-installer";
|
||||
#[cfg(any(target_os = "freebsd", target_os = "openbsd"))]
|
||||
pub const INSTALLED_VPNC_SCRIPT: &str = "/var/db/gpclient/scripts/vpnc-script";
|
||||
pub const MAX_VPNC_SCRIPT_SIZE: usize = 1024 * 1024;
|
||||
pub const GP_CALLBACK_PORT_FILENAME: &str = "gpcallback.port";
|
||||
|
||||
// Release binaries - macOS (Apple Silicon Homebrew)
|
||||
|
||||
Reference in new issue
Block a user