1pub mod xray;
2
3use std::collections::HashMap;
4
5use async_trait::async_trait;
6
7use crate::error::Result;
8
9#[async_trait]
12pub trait BenchmarkSession: Send + Sync {
13 fn endpoints(&self) -> &HashMap<String, String>;
15 async fn shutdown(self: Box<Self>) -> Result<()>;
17}
18
19#[async_trait]
21pub trait ProxyCore: Send + Sync {
22 fn name(&self) -> &'static str;
23 async fn is_installed(&self) -> bool;
24 async fn install(&self) -> Result<()>;
25 async fn active_profile(&self) -> Result<Option<String>>;
26 async fn switch_profile(&self, outbound_tag: &str) -> Result<()>;
27 async fn reload(&self) -> Result<()>;
28
29 async fn start_benchmark_session(
33 &self,
34 _outbound_tags: &[String],
35 ) -> Result<Option<Box<dyn BenchmarkSession>>> {
36 Ok(None)
37 }
38}