a3s_box_runtime/network/
mod.rs1#[cfg(any(target_os = "linux", test))]
9mod passt;
10mod store;
11
12#[cfg(target_os = "macos")]
13pub use a3s_box_netproxy::NetProxyManager;
14#[cfg(any(target_os = "linux", test))]
15pub use passt::{terminate_passt, PasstManager};
16pub use store::NetworkStore;
17
18pub trait NetworkBackend: Send + Sync {
20 fn socket_path(&self) -> &std::path::Path;
22 fn stop(&mut self);
24}
25
26#[cfg(target_os = "macos")]
27impl NetworkBackend for NetProxyManager {
28 fn socket_path(&self) -> &std::path::Path {
29 self.socket_path()
30 }
31
32 fn stop(&mut self) {
33 self.stop();
34 }
35}