Skip to main content

apfsds_transport/
lib.rs

1//! APFSDS Transport - WebSocket and network layer
2//!
3//! This crate provides:
4//! - WebSocket client with Chrome handshake emulation
5//! - WebSocket server
6//! - Connection pool (round-robin)
7//! - Noise traffic generation
8//! - Exit node communication
9
10mod exit_client;
11mod exit_pool;
12mod frame_codec;
13mod mtls;
14mod noise;
15mod pool;
16mod quic;
17mod ssh;
18mod wss_client;
19mod wss_server;
20
21pub use exit_client::*;
22pub use exit_pool::*;
23pub use frame_codec::*;
24pub use mtls::*;
25pub use noise::*;
26pub use pool::*;
27pub use quic::*;
28pub use ssh::*;
29pub use wss_client::*;
30pub use wss_server::*;
31
32use apfsds_protocol::PlainPacket;
33use async_trait::async_trait;
34use std::sync::Arc;
35
36#[async_trait]
37pub trait PacketDispatcher: Send + Sync {
38    async fn dispatch(&self, packet: PlainPacket);
39}
40
41pub type SharedPacketDispatcher = Arc<dyn PacketDispatcher>;