Skip to main content

Installation

TurkeyDPI can be installed via Cargo (Rust’s package manager) or built directly from source. Choose the method that works best for you.

Prerequisites

Before installing TurkeyDPI, ensure you have:

Rust Toolchain

Rust 1.70 or later with Cargo package manager

Git

Git for cloning the repository (source build only)

Installing Rust

If you don’t have Rust installed, get it from rustup.rs:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Verify the installation:
rustc --version
cargo --version
You should see output like:
rustc 1.75.0 (82e1608df 2023-12-21)
cargo 1.75.0 (1d8b05cdd 2023-11-20)
Building from source gives you the latest version with all features.
1

Clone the Repository

Clone the TurkeyDPI repository from GitHub:
git clone https://github.com/1etu/turkeydpi.git
cd turkeydpi
2

Install the CLI Binary

Use Cargo to build and install the turkeydpi binary:
cargo install --path cli
This compiles the project in release mode and installs the binary to ~/.cargo/bin/turkeydpi.
Make sure ~/.cargo/bin is in your PATH. The Rust installer usually adds this automatically.
3

Verify Installation

Check that TurkeyDPI is installed correctly:
turkeydpi --version
You should see:
turkeydpi 0.1.0

Method 2: Build Manually

If you want to build without installing, or need to customize the build:
1

Clone and Build

git clone https://github.com/1etu/turkeydpi.git
cd turkeydpi
cargo build --release
The compiled binary will be at target/release/turkeydpi.
2

Run the Binary

You can run it directly:
./target/release/turkeydpi --help
Or copy it to a location in your PATH:
cp target/release/turkeydpi ~/.local/bin/
# or
sudo cp target/release/turkeydpi /usr/local/bin/

Project Structure

The TurkeyDPI repository is organized as a Cargo workspace with multiple crates:
turkeydpi/
├── cli/        # Command-line interface binary
├── engine/     # Core bypass logic and transforms
├── backend/    # Proxy server implementations
├── control/    # Daemon control and IPC
└── Cargo.toml  # Workspace configuration
From Cargo.toml:
[workspace]
resolver = "2"
members = [
    "engine",
    "backend",
    "control",
    "cli",
]

[workspace.package]
version = "0.1.0"
edition = "2021"
authors = ["1etu"]
license = "MIT"
repository = "https://github.com/1etu/turkeydpi"

Build Options

Release Build (Optimized)

For production use with full optimizations:
cargo build --release

Debug Build (Fast Compilation)

For development with debug symbols:
cargo build

Verbose Logging

Enable verbose output during compilation:
cargo build --release --verbose

Platform-Specific Notes

macOS

On macOS, you may need to grant network permissions the first time you run TurkeyDPI. Click “Allow” when prompted.
TurkeyDPI also includes a native macOS menu bar app:
cd TurkeyDPI-App
./build.sh
open TurkeyDPI.app
This provides one-click proxy toggle from your menu bar.

Linux

On Linux, ensure you have the development dependencies:
sudo apt-get update
sudo apt-get install build-essential pkg-config libssl-dev

Windows

On Windows, you’ll need:
  1. Visual Studio Build Tools or Visual Studio with C++ development tools
  2. Rust via rustup-init.exe from rustup.rs
Then build normally:
git clone https://github.com/1etu/turkeydpi.git
cd turkeydpi
cargo install --path cli

Troubleshooting

Cargo Not Found

If you get cargo: command not found, make sure ~/.cargo/bin is in your PATH:
# Add to ~/.bashrc or ~/.zshrc
export PATH="$HOME/.cargo/bin:$PATH"

# Then reload
source ~/.bashrc  # or source ~/.zshrc

Compilation Errors

If you encounter compilation errors:
1

Update Rust

rustup update
2

Clean Build

cargo clean
cargo build --release
3

Check Dependencies

Ensure you have all system dependencies installed (see platform-specific notes above).

Permission Denied

On Linux/macOS, if you get permission errors when installing:
# Don't use sudo with cargo install!
# Instead, ensure ~/.cargo/bin is writable
chmod u+w ~/.cargo/bin

# Or install to a custom location
cargo install --path cli --root ~/my-tools
Never run cargo install with sudo. This can cause permission issues and security risks.

Updating TurkeyDPI

To update to the latest version:
cd turkeydpi
git pull origin main
cargo install --path cli --force
The --force flag reinstalls even if the version hasn’t changed.

Uninstalling

To remove TurkeyDPI:
cargo uninstall turkeydpi
This removes the binary from ~/.cargo/bin/. If you built manually, simply delete the binary:
rm ~/.local/bin/turkeydpi
# or wherever you copied it

Verifying the Installation

Once installed, verify everything works:
# Check version
turkeydpi --version

# View help
turkeydpi --help

# Test the bypass command
turkeydpi bypass --help
You should see the command-line interface help text showing all available commands and options.

Development Dependencies

The project uses these key dependencies from Cargo.toml:
[workspace.dependencies]
tokio = { version = "1.35", features = ["full"] }
bytes = "1.5"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
thiserror = "1.0"
anyhow = "1.0"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
parking_lot = "0.12"
lru = "0.12"
ipnet = "2.9"
clap = { version = "4.4", features = ["derive"] }

Next Steps

Now that TurkeyDPI is installed, learn how to use it:

Quick Start Guide

Get your bypass proxy running in 60 seconds

Introduction

Learn how TurkeyDPI works under the hood

Build docs developers (and LLMs) love