Installation
How to install trojan-rs on your system
Pre-built Binaries
Download the latest release for your platform from GitHub Releases.
Supported Platforms
| Platform | Architecture |
|---|---|
| Linux | x86_64, aarch64, armv7, i686 |
| Linux (musl) | x86_64, aarch64, armv7, i686 |
| macOS | x86_64, aarch64 (Apple Silicon) |
| Windows | x86_64 |
Extract and place the binary in your PATH:
tar xzf trojan-x86_64-unknown-linux-gnu.tar.gz
sudo mv trojan /usr/local/bin/Install via Cargo
If you have a Rust toolchain installed:
cargo install trojanThis installs the latest published version from crates.io.
Build from Source
Clone and build:
git clone https://github.com/trojan-rs/trojan-rs
cd trojan-rs
cargo build --releaseThe binary is at target/release/trojan.
Optional Features
The build supports optional Cargo features:
# With certificate generation support
cargo build --release --features cert
# With self-upgrade support
cargo build --release --features upgrade
# With analytics support
cargo build --release --features analyticsVerify Installation
trojan --version
trojan --helpThe --help flag shows all available subcommands:
trojan server - Run the Trojan server
trojan client - Run the Trojan client (SOCKS5 proxy)
trojan cert - Certificate management
trojan auth - User management (SQL backends)
trojan entry - Run a relay entry node
trojan relay - Run a relay node