Built with Rust & Tokio
trojan-rs
A high-performance implementation of the Trojan protocol. Full-featured server, SOCKS5 client, and multi-hop relay chain.
Why trojan-rs
High Performance
Async Rust with Tokio, zero-copy relay, TCP Fast Open, and SO_REUSEPORT for multi-core scaling.
Flexible Auth
In-memory, SQLite, PostgreSQL, and MySQL backends with traffic limits and expiration.
Full Observability
Prometheus metrics, structured JSON logging, and ClickHouse analytics with sampling.
CDN Compatible
WebSocket transport with mixed/split modes for Cloudflare and other CDN providers.
Rule-Based Routing
Domain, IP CIDR, GeoIP matching with Surge and Clash rule format support.
Cross-Platform
Linux, macOS, and Windows with pre-built binaries for x86_64, aarch64, and armv7.