mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 22:46:14 -05:00
feat: generate HIP reports through OpenConnect callbacks
This commit is contained in:
46 files changed
+2511
-1184
No files matched your search
@@ -39,6 +39,7 @@ pub(crate) struct WsServerContext {
|
||||
dispatcher: Arc<RequestDispatcher>,
|
||||
state: Mutex<ServiceState>,
|
||||
handshake_slots: Arc<Semaphore>,
|
||||
pub(crate) hip_previews: crate::hip_preview::HipPreviews,
|
||||
}
|
||||
|
||||
impl WsServerContext {
|
||||
@@ -58,6 +59,7 @@ impl WsServerContext {
|
||||
connections: HashMap::new(),
|
||||
}),
|
||||
handshake_slots: Arc::new(Semaphore::new(16)),
|
||||
hip_previews: crate::hip_preview::HipPreviews::new(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +67,10 @@ impl WsServerContext {
|
||||
self.product_version
|
||||
}
|
||||
|
||||
pub async fn host_identity(&self) -> HostIdentity {
|
||||
self.state.lock().await.snapshot.host_info.host_identity.clone()
|
||||
}
|
||||
|
||||
pub fn registry(&self) -> &Arc<SessionRegistry> {
|
||||
&self.registry
|
||||
}
|
||||
@@ -243,6 +249,7 @@ impl WsServer {
|
||||
info!("WS server cancelled");
|
||||
}
|
||||
}
|
||||
self.ctx.hip_previews.shutdown().await;
|
||||
let _ = shutdown_tx.send(()).await;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user