Actix-Web Overlay Network Proxy Orchestrator
A high-performance, asynchronous WebSocket signaling and orchestration API built to securely manage and route distributed proxy nodes across Tor and Lokinet overlay networks.
Tech stack
- Languages
- Frameworks & libraries
- Tools
Performance & metrics
- Zero-latency state resolution achieved by completely bypassing disk I/O, performing all mutating operations directly within mapped memory
- Actor-based WebSocket routing inherently isolates state context per connection, preventing global thread blocking during heavy concurrent node authentication
Why I built it
Deploying distributed routing infrastructures across privacy-centric overlay networks (Tornet/Lokinet) requires a highly concurrent, secure signaling backbone. I engineered this orchestrator to serve as the centralized discovery and authentication registry. By eliminating heavy RDBMS dependencies in favor of in-memory state tracking, the system is designed for rapid deployment in resource-constrained or ephemeral environments where node churn is extremely high.
Architecture & decisions
Built on the tokio async runtime utilizing the actix-web framework. Full-duplex WebSocket connections are managed concurrently using the Actor model via actix_web_actors. Global state (registered nodes, active proxies, and user credentials) is managed entirely in-memory leveraging Arc<Mutex<HashMap>> for thread-safe interior mutability. Access control is strictly enforced via custom JWT Bearer middleware and Bcrypt cryptographic hashing. Nodes must register using an environment-injected API key before authenticating over WS to announce their routing IP and port metrics.
Key features
- 01Full-duplex WebSocket Actor architecture for real-time proxy node telemetry, ping/pong health checks, and lifecycle management
- 02Lock-contention mitigated in-memory concurrent state tracking using
Arc<Mutex<T>> - 03Strict JWT-based bearer authentication middleware coupled with Bcrypt cryptographic hashing for node and user validation
- 04Purpose-built API schema designed to synchronize IP/Port address mappings seamlessly with Tor and Lokinet routing configurations