diff options
| author | Andrew Guschin <guschin@altlinux.org> | 2026-10-30 03:32:00 +0400 |
|---|---|---|
| committer | Andrew Guschin <guschin@altlinux.org> | 2026-10-30 03:32:00 +0400 |
| commit | fc3c1d51b1be9db6ba6ad286584fbc34bb305f38 (patch) | |
| tree | d23628e0534f0a4646c111c2ef6dd1501f18ae17 /src/runtime.rs | |
| parent | d608ffeeda1a479c9dc0e5f6ad269ba07a510d7f (diff) | |
Fix protected activation ordering and diagnostic review findings
Diffstat (limited to 'src/runtime.rs')
| -rw-r--r-- | src/runtime.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtime.rs b/src/runtime.rs index 96ffd0d..2d5552d 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -7,9 +7,16 @@ pub trait Runtime: Send { /// Protection must be installed before durable enabled intent changes. async fn arm(&mut self) -> Result<()>; async fn apply(&mut self, connection: Option<&Trojan>, generation: u64) -> Result<()>; + async fn block(&mut self) -> Result<()> { + self.arm().await?; + self.apply(None, 0).await + } async fn maintain(&mut self, connection: Option<&Trojan>, generation: u64) -> Result<()> { self.apply(connection, generation).await } + async fn probe(&mut self, _: &Trojan, _: u64) -> Result<crate::xray::Probe> { + bail!("Protected diagnostic probes are unavailable in this runtime") + } /// Called only after disabled intent has been durably recorded. async fn disable(&mut self) -> Result<()>; fn routing(&self) -> &str; |