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

+2 -1
View File
@@ -2,7 +2,7 @@ use clap::{ValueEnum, builder::PossibleValue};
use crate::{
gp_params::CscMode,
os_profile::{ClientOs, runtime_client_os},
os_profile::{ClientOs, desktop::runtime_client_os},
};
#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)]
@@ -31,6 +31,7 @@ impl Default for Os {
ClientOs::Linux => Os::Linux,
ClientOs::Windows => Os::Windows,
ClientOs::Mac => Os::Mac,
ClientOs::Ios => unreachable!("The desktop CLI is not available on iOS"),
}
}
}
+3 -39
View File
@@ -11,8 +11,6 @@ use crate::{
pub mod args;
pub trait Args {
#[cfg(not(target_os = "macos"))]
fn fix_openssl(&self) -> bool;
fn ignore_tls_errors(&self) -> bool;
/// How this program renders its logs.
@@ -43,14 +41,6 @@ fn retry_hints(err: &anyhow::Error, args: &impl Args) -> Vec<String> {
// users already see; keep it exactly.
let mut hints = Vec::new();
#[cfg(not(target_os = "macos"))]
if kind == ServerTlsErrorKind::LegacyRenegotiation && !args.fix_openssl() {
let (program, rest) = command_line();
hints.push(format!(
"Re-run it with the `--fix-openssl` option to work around this issue, e.g.:\n\n{program} --fix-openssl {rest}"
));
}
if kind == ServerTlsErrorKind::Certificate && !args.ignore_tls_errors() {
let (program, rest) = command_line();
hints.push(format!(
@@ -204,18 +194,11 @@ mod tests {
#[derive(Default)]
struct TestArgs {
#[cfg(not(target_os = "macos"))]
fix_openssl: bool,
ignore_tls_errors: bool,
log_format: LogFormat,
}
impl Args for TestArgs {
#[cfg(not(target_os = "macos"))]
fn fix_openssl(&self) -> bool {
self.fix_openssl
}
fn ignore_tls_errors(&self) -> bool {
self.ignore_tls_errors
}
@@ -260,31 +243,12 @@ mod tests {
}
#[test]
fn hints_distinguish_legacy_and_unknown_tls_and_respect_both_flags() {
let legacy = ServerTlsError {
server: "https://vpn.example.com".into(),
kind: ServerTlsErrorKind::LegacyRenegotiation,
};
let hints = retry_hints(&anyhow!(legacy.clone()), &TestArgs::default());
if cfg!(target_os = "macos") {
assert!(hints.is_empty());
} else {
assert_eq!(hints.len(), 1);
assert!(hints[0].contains("--fix-openssl"));
}
let args = TestArgs {
#[cfg(not(target_os = "macos"))]
fix_openssl: true,
ignore_tls_errors: true,
..Default::default()
};
assert!(retry_hints(&anyhow!(legacy), &args).is_empty());
assert!(retry_hints(&anyhow!(certificate_error()), &args).is_empty());
let other = ServerTlsError {
fn unknown_tls_failure_does_not_suggest_bypassing_certificate_validation() {
let error = ServerTlsError {
server: "https://vpn.example.com".into(),
kind: ServerTlsErrorKind::Other,
};
assert!(retry_hints(&anyhow!(other), &TestArgs::default()).is_empty());
assert!(retry_hints(&anyhow!(error), &TestArgs::default()).is_empty());
}
/// Suggesting an option the user already passed is noise, and in JSON mode it