mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 14:36:15 -05:00
release: prepare GP Connect 3.5.0 with Windows support
This commit is contained in:
172 files changed
+9629
-1171
No files matched your search
@@ -31,6 +31,8 @@ mod script_tun;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub(crate) struct LifecycleHandle {
|
||||
#[cfg(windows)]
|
||||
pub(crate) patch_checks: Arc<crate::windows_patches::PatchChecks>,
|
||||
events: mpsc::Sender<LifecycleEvent>,
|
||||
admissions: Arc<Mutex<Admissions>>,
|
||||
tunnel: watch::Sender<TunnelBinding>,
|
||||
@@ -126,6 +128,7 @@ impl LifecycleHandle {
|
||||
ServiceResult::Accepted
|
||||
}
|
||||
|
||||
#[cfg(any(unix, test))]
|
||||
pub async fn disconnect_and_wait(&self) -> bool {
|
||||
let completion = {
|
||||
let mut admissions = self.admissions.lock().expect("VPN lifecycle admissions mutex poisoned");
|
||||
@@ -447,7 +450,7 @@ pub(crate) struct VpnTask {
|
||||
events: mpsc::Receiver<LifecycleEvent>,
|
||||
lifecycle: LifecycleHandle,
|
||||
vpn_state_tx: watch::Sender<VpnState>,
|
||||
brokered_macos: bool,
|
||||
restricted_desktop: bool,
|
||||
registry: Arc<crate::session_registry::SessionRegistry>,
|
||||
active: Option<ActiveAttempt>,
|
||||
cancel_token: CancellationToken,
|
||||
@@ -456,11 +459,13 @@ pub(crate) struct VpnTask {
|
||||
impl VpnTask {
|
||||
pub fn new(
|
||||
vpn_state_tx: watch::Sender<VpnState>,
|
||||
brokered_macos: bool,
|
||||
restricted_desktop: bool,
|
||||
registry: Arc<crate::session_registry::SessionRegistry>,
|
||||
) -> (Self, LifecycleHandle) {
|
||||
let (events_tx, events) = mpsc::channel(4);
|
||||
let lifecycle = LifecycleHandle {
|
||||
#[cfg(windows)]
|
||||
patch_checks: crate::windows_patches::PatchChecks::new(),
|
||||
events: events_tx,
|
||||
admissions: Arc::new(Mutex::new(Admissions::default())),
|
||||
tunnel: watch::channel(TunnelBinding::default()).0,
|
||||
@@ -470,7 +475,7 @@ impl VpnTask {
|
||||
events,
|
||||
lifecycle: lifecycle.clone(),
|
||||
vpn_state_tx,
|
||||
brokered_macos,
|
||||
restricted_desktop,
|
||||
registry,
|
||||
active: None,
|
||||
cancel_token: CancellationToken::new(),
|
||||
@@ -617,7 +622,7 @@ impl VpnTask {
|
||||
desktop_uid,
|
||||
edited_report,
|
||||
session_id,
|
||||
brokered_macos: self.brokered_macos,
|
||||
restricted_desktop: self.restricted_desktop,
|
||||
registry: self.registry.clone(),
|
||||
lifecycle: self.lifecycle.clone(),
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user