feat: release GP Connect 3.3.0 with Native Shell support

This commit is contained in:
Kevin Yue committed 2026-11-05 23:05:14 +08:00
1 parent d12d677208
commit fd08cdbe66
226 files changed
+7700 -5225

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ use crate::service::{vpn_env::VpnEnv, vpn_state::VpnState};
/// Events that can be emitted by the service
#[derive(Debug, Serialize, Deserialize, Clone)]
pub enum WsEvent {
TunnelState(Option<crate::session::tunnel::TunnelState>),
TunnelState(Option<crate::session::desktop::tunnel::TunnelState>),
VpnEnv(VpnEnv),
VpnState(VpnState),
ActiveGui,
+9 -5
View File
@@ -7,7 +7,7 @@ use zeroize::Zeroize;
use crate::{
hip::HipSource,
os_profile::{ClientOs, HostIdentity, OsProfile},
session::ConnectionPlan,
session::desktop::ConnectionPlan,
};
use super::vpn_state::ConnectInfo;
@@ -442,6 +442,8 @@ pub enum WsRequest {
pub struct UpdateGuiRequest {
pub path: String,
pub checksum: String,
#[serde(default)]
pub variant: crate::gui::GuiVariant,
}
#[cfg(test)]
@@ -452,14 +454,14 @@ mod tests {
use crate::os_profile::OsProfileBuilder;
use crate::{
gateway::Gateway,
session::{AuthenticatedGateway, GatewayAuthentication, InternalSessionPolicy},
session::{GatewayAuthentication, InternalSessionPolicy, desktop::AuthenticatedGateway},
};
fn test_request(info: ConnectInfo) -> ConnectRequest {
let plan = ConnectionPlan::new(
vec![AuthenticatedGateway {
gateway: info.gateway().clone(),
binding: Some(crate::session::network::test_binding()),
binding: Some(crate::session::desktop::network::test_binding()),
authentication: GatewayAuthentication::new("authcookie=secret-cookie&user=user".into(), "tunnel".into())
.unwrap(),
}],
@@ -527,7 +529,9 @@ mod tests {
#[test]
fn with_os_profile_sets_user_agent_from_profile() {
let profile = OsProfileBuilder::new(ClientOs::Linux).client_version("6.0.0").build();
let profile = OsProfileBuilder::new(ClientOs::Linux)
.client_version("6.0.0")
.build(crate::os_profile::test_snapshot());
let req = test_request(test_connect_info()).with_os_profile(&profile);
@@ -536,7 +540,7 @@ mod tests {
#[test]
fn with_os_profile_sets_host_id_from_profile_runtime_identity() {
let profile = OsProfileBuilder::new(ClientOs::Linux).build();
let profile = OsProfileBuilder::new(ClientOs::Linux).build(crate::os_profile::test_snapshot());
let req = test_request(test_connect_info()).with_os_profile(&profile);
@@ -18,7 +18,7 @@ pub enum ClientMessage {
#[serde(tag = "type", content = "data", rename_all = "camelCase", deny_unknown_fields)]
pub enum ServerMessage {
TunnelStatistics {
snapshot: crate::session::tunnel::TunnelStatisticsSnapshot,
snapshot: crate::session::desktop::tunnel::TunnelStatisticsSnapshot,
},
Attached {
connection_id: Uuid,
@@ -42,7 +42,7 @@ pub enum ServerMessage {
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "type", content = "data", rename_all = "camelCase", deny_unknown_fields)]
pub enum ServiceResult {
TunnelStatisticsSnapshot(crate::session::tunnel::TunnelStatisticsSnapshot),
TunnelStatisticsSnapshot(crate::session::desktop::tunnel::TunnelStatisticsSnapshot),
Accepted,
StoredHipReport {
report_id: String,
@@ -171,10 +171,10 @@ mod tests {
let gateway = Gateway::new("Gateway".to_string(), "vpn.example.com".to_string());
let info = ConnectInfo::new("portal.example.com".to_string(), gateway.clone(), vec![gateway]);
let certificate_size = MAX_CLIENT_IDENTITY_DATA / 2;
let plan = crate::session::ConnectionPlan::new(
vec![crate::session::AuthenticatedGateway {
let plan = crate::session::desktop::ConnectionPlan::new(
vec![crate::session::desktop::AuthenticatedGateway {
gateway: info.gateway().clone(),
binding: Some(crate::session::network::test_binding()),
binding: Some(crate::session::desktop::network::test_binding()),
authentication: crate::session::GatewayAuthentication::new(
"authcookie=token&user=user".into(),
"tunnel".into(),
@@ -200,12 +200,13 @@ mod tests {
#[test]
fn full_configuration_and_large_metadata_fit_complete_snapshot_envelopes_at_the_budget() {
use crate::{
os_profile::HostIdentity,
service::{
vpn_env::HostInfo,
vpn_state::{ConnectedInfo, VpnState},
},
session::tunnel::{MAX_CONFIGURATION_BYTES, TunnelConfiguration, TunnelPhase, TunnelState, TunnelTransport},
session::desktop::tunnel::{
MAX_CONFIGURATION_BYTES, TunnelConfiguration, TunnelPhase, TunnelState, TunnelTransport,
},
};
let mut configuration = TunnelConfiguration::default();
configuration.included_routes.items = vec!["r".repeat(1024); 15];
@@ -234,7 +235,7 @@ mod tests {
vpnc_script: Some("s".repeat(1024)),
auth_executable: "a".repeat(1024),
host_info: HostInfo {
host_identity: HostIdentity::collect(),
host_identity: crate::os_profile::desktop::collect_identity(),
},
};
for mut message in [
@@ -21,3 +21,8 @@ pub const MAX_SERVICE_MESSAGE: usize = 256;
/// Private desktop control messages; never carry credentials.
pub const DESKTOP_GUI_EXITED: u8 = 0;
pub const DESKTOP_RENDERING_RETRY: u8 = 1;
pub const DESKTOP_SWITCH_BEGIN: u8 = 2;
pub const DESKTOP_SWITCH_COMMIT: u8 = 3;
pub const DESKTOP_SWITCH_CANCEL: u8 = 4;
/// Query whether the service package can install GUI runtime dependencies; replies with 0 or 1.
pub const DESKTOP_GUI_INSTALLER: u8 = 5;
+1 -1
View File
@@ -18,7 +18,7 @@ pub struct HostInfo {
/// to the client so that it can configure itself accordingly.
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct VpnEnv {
pub tunnel_state: Option<crate::session::tunnel::TunnelState>,
pub tunnel_state: Option<crate::session::desktop::tunnel::TunnelState>,
/// The VPN connection state
pub vpn_state: VpnState,
+5 -1
View File
@@ -5,7 +5,7 @@ use specta::Type;
use crate::{
gateway::Gateway,
session::{GatewayFailureSummary, GatewaySessionSummary, SessionInfo},
session::{GatewaySessionSummary, SessionInfo, desktop::GatewayFailureSummary},
};
#[derive(Debug, Deserialize, Serialize, Type, Clone)]
@@ -105,6 +105,10 @@ impl ConnectInfo {
pub fn gateway(&self) -> &Gateway {
&self.gateway
}
pub fn gateways(&self) -> &[Gateway] {
&self.gateways
}
}
#[derive(Debug, Serialize, Deserialize, Clone)]