Trojan Rust

Installation

How to install trojan-rs on your system

Pre-built Binaries

Download the latest release for your platform from GitHub Releases.

Supported Platforms

PlatformArchitecture
Linuxx86_64, aarch64, armv7, i686
Linux (musl)x86_64, aarch64, armv7, i686
macOSx86_64, aarch64 (Apple Silicon)
Windowsx86_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 trojan

This 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 --release

The 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 analytics

Verify Installation

trojan --version
trojan --help

The --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

On this page