feat: prepare 3.1.0 with connection details and improved authentication

Add tunnel statistics and an optional CLI dashboard, native sign-in controls and recovery, and broader client certificate support. Include platform integration fixes and the approved release notes.
This commit is contained in:
Kevin Yue committed 2026-10-19 23:47:11 +08:00
1 parent 18ed6bac1a
commit 4faa2ecb0d
158 files changed
+13752 -1038

No files matched your search

+14
View File
@@ -1,10 +1,13 @@
mod hip;
mod network_configuration;
mod tunnel;
use crate::Vpn;
use hip::HipGenerateFn;
pub(crate) use hip::{
HipControlRaw, HipScriptRaw, collect_hip_script, collect_hip_source, generate_hip_report, script_environment,
};
use log::{debug, info, trace, warn};
pub(crate) use network_configuration::{VpnOptionRaw, configure_network};
use std::ffi::{c_char, c_int, c_long, c_void};
use std::panic::{AssertUnwindSafe, catch_unwind};
@@ -26,6 +29,7 @@ pub(crate) struct ConnectOptions {
pub local_hostname: *const c_char,
pub script: *const c_char,
pub configure_network: Option<unsafe extern "C" fn(*mut c_void, *const c_char, *const VpnOptionRaw) -> c_int>,
pub interface: *const c_char,
pub script_tun: u32,
@@ -61,6 +65,7 @@ pub(crate) struct VpnSessionInfoRaw {
#[link(name = "vpn")]
unsafe extern "C" {
fn vpn_write_cancel(fd: c_int) -> c_int;
fn vpn_write_statistics(fd: c_int) -> c_int;
#[link_name = "vpn_connect"]
fn vpn_connect(
options: *const ConnectOptions,
@@ -78,6 +83,15 @@ pub(crate) fn write_cancel(fd: i32) -> std::io::Result<()> {
}
}
pub(crate) fn write_statistics(fd: i32) -> std::io::Result<()> {
let error = unsafe { vpn_write_statistics(fd) };
if error == 0 {
Ok(())
} else {
Err(std::io::Error::from_raw_os_error(error))
}
}
#[unsafe(no_mangle)]
extern "C" fn vpn_attach_command_pipe(vpn: *mut c_void, fd: c_int) -> c_int {
unsafe { &*(vpn as *const Vpn) }.attach_command_pipe(fd).into()