feat: add device anchor persistence and serialize vpn lifecycle

- Implement Unix device anchor discovery, root-owned persistence under /var/lib/gp, and credential delivery in gpapi and gpservice.
- Introduce LifecycleHandle to serialize VPN connect/disconnect lifecycles and ensure cancellation cannot be superseded by late connect events.
This commit is contained in:
Kevin Yue committed 2026-09-19 17:37:32 +08:00
1 parent 9d8c3b4e34
commit 308957283b
13 files changed
+866 -217

No files matched your search

+2 -4
View File
@@ -290,9 +290,8 @@ mod tests {
credential.product_version(),
)
.unwrap();
let (request_tx, _request_rx) = mpsc::channel(1);
let dispatcher = Arc::new(RequestDispatcher::new(
request_tx,
crate::vpn_task::LifecycleHandle::for_tests(),
Arc::new(AtomicBool::new(false)),
Arc::new(Redaction::new()),
true,
@@ -341,9 +340,8 @@ mod tests {
async fn removed_prepared_candidate_cannot_commit_takeover() {
let registry = Arc::new(SessionRegistry::new(Uuid::new_v4()));
let credential = registry.issue(env!("CARGO_PKG_VERSION")).unwrap();
let (request_tx, _request_rx) = mpsc::channel(1);
let dispatcher = Arc::new(RequestDispatcher::new(
request_tx,
crate::vpn_task::LifecycleHandle::for_tests(),
Arc::new(AtomicBool::new(false)),
Arc::new(Redaction::new()),
true,