mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-20 06:56:17 -05:00
refactor: align GP profile and packaging flow
Main changes: - Refactor connect/auth flows around a single OS profile and host identity model, including gateway fallback and cookie-on-stdin handling. - Align request parameters, HIP host-id propagation, SAML webview user-agent behavior, and portal default-browser handling with observed official client behavior. - Add opt-in cookie cache support and Microsoft Defender HIP reporting while keeping host-id validation explicit. - Add BSD build, packaging, release artifact, and provenance support with FreeBSD/OpenBSD path and dependency cleanup. - Update NixOS install documentation and dependency compatibility fixes.
This commit is contained in:
92 files changed
+9847
-2868
No files matched your search
@@ -15,6 +15,7 @@ pub(crate) struct ConnectOptions {
|
||||
pub os: *const c_char,
|
||||
pub os_version: *const c_char,
|
||||
pub client_version: *const c_char,
|
||||
pub host_id: *const c_char,
|
||||
pub local_hostname: *const c_char,
|
||||
|
||||
pub script: *const c_char,
|
||||
|
||||
@@ -80,6 +80,7 @@ int vpn_connect(const vpn_options *options, vpn_connected_callback callback)
|
||||
INFO("USER_AGENT: %s", options->user_agent);
|
||||
INFO("OS: %s", options->os);
|
||||
INFO("CLIENT_VERSION: %s", options->client_version);
|
||||
INFO("HOST_ID: %s", options->host_id ? options->host_id : "(not set)");
|
||||
INFO("VPNC_SCRIPT: %s", options->script);
|
||||
INFO("SCRIPT_TUN: %d", g_script_tun);
|
||||
INFO("CSD_USER: %d", options->csd_uid);
|
||||
@@ -120,6 +121,10 @@ int vpn_connect(const vpn_options *options, vpn_connected_callback callback)
|
||||
options->client_version);
|
||||
}
|
||||
|
||||
if (options->host_id) {
|
||||
openconnect_set_gp_host_id(vpninfo, options->host_id);
|
||||
}
|
||||
|
||||
effective_local_hostname = options->local_hostname;
|
||||
if (!effective_local_hostname && !uname(&utsbuf)) {
|
||||
effective_local_hostname = utsbuf.nodename;
|
||||
|
||||
@@ -25,6 +25,7 @@ typedef struct vpn_options {
|
||||
const char *os;
|
||||
const char *os_version;
|
||||
const char *client_version;
|
||||
const char *host_id;
|
||||
const char *local_hostname;
|
||||
|
||||
const char *script;
|
||||
|
||||
Reference in new issue
Block a user