# turkeydpi CLI `turkeydpi` is a single binary with subcommands. Global flags come before the subcommand. ## Global flags | Flag | Description | | --- | --- | | `-c, --config ` | Load a config file (TOML or JSON) before running. | | `--log-level ` | Log verbosity. Default: `info`. | | `--json-logs` | Emit logs as JSON. | | `--socket ` | Control daemon socket/port-file path. | ## Subcommands ### bypass Run the HTTP proxy that fragments TLS and HTTP requests. ```bash turkeydpi bypass [OPTIONS] ``` | Flag | Description | | --- | --- | | `-l, --listen ` | Listen address. Default: `127.0.0.1:8844`. | | `-p, --preset ` | Bypass preset. Default: `aggressive`. | | `--domains ` | Only fragment hosts listed in this file; everything else is forwarded untouched. | | `-v, --verbose` | Debug logging. | Preset values: `turk-telekom`, `vodafone`, `superonline`, `aggressive`, `none`. ### run Run the control daemon, optionally with the SOCKS5 proxy. ```bash turkeydpi run [--proxy] [--listen ] ``` | Flag | Description | | --- | --- | | `--proxy` | Also start the SOCKS5 proxy backend. | | `--listen ` | SOCKS5 listen address. Default: `127.0.0.1:1080`. | ### start / stop / status / health / stats / reset-stats Talk to a running daemon over the control socket. ```bash turkeydpi start turkeydpi stop turkeydpi status turkeydpi health turkeydpi stats turkeydpi reset-stats ``` - `start` — start the proxy in a running daemon. - `stop` — stop the proxy in a running daemon. - `status` — show daemon state, active flows, packets/bytes processed, errors. - `health` — show daemon version, API version, running state, uptime, backend, OS/arch. - `stats` — show traffic counters (packets in/out, bytes in/out, drops, matches, transformed, fragments generated, jitter, flows). - `reset-stats` — reset traffic counters. ### validate Check a config file without starting anything. ```bash turkeydpi validate ``` ### reload Push a config file into a running daemon. ```bash turkeydpi reload ``` ### doctor Test every preset against blocked sites and report what works. ```bash turkeydpi doctor [OPTIONS] ``` | Flag | Description | | --- | --- | | `-d, --domain ` | Test this host instead of the defaults; repeatable. | | `-t, --trials ` | Attempts per host per preset. Default: `4`. | | `--json` | Print a machine-readable JSON report. | Without `--domain`, it probes the default test set: `discord.com`, `x.com`, `media.discordapp.net`, `wikipedia.org`, `soundcloud.com`. It always includes the `none` preset as a baseline. ### set-proxy Point the system proxy at a running TurkeyDPI. ```bash turkeydpi set-proxy [--listen ] ``` | Flag | Description | | --- | --- | | `-l, --listen ` | Proxy address to point at. Default: `127.0.0.1:8844`. | ### unset-proxy Clear the system proxy. Use this if a crash left you offline. ```bash turkeydpi unset-proxy ``` ### gen-config Print a starting config file. ```bash turkeydpi gen-config [OPTIONS] ``` | Flag | Description | | --- | --- | | `--format ` | Output format: `toml` or `json`. Default: `toml`. | | `-o, --output ` | Write to a file instead of stdout. | ## Examples ```bash # Find the preset that works on your connection turkeydpi doctor # Run the bypass proxy with a specific preset turkeydpi bypass --preset turk-telekom # Only fragment hosts listed in a file turkeydpi bypass --domains domains.example.txt # Point the system proxy at the running proxy turkeydpi set-proxy # Restore the system proxy after a crash turkeydpi unset-proxy # Generate and validate a config turkeydpi gen-config > turkeydpi.toml turkeydpi validate turkeydpi.toml # Run the daemon and SOCKS5 proxy together turkeydpi run --proxy --listen 127.0.0.1:1080 # Daemon control turkeydpi start turkeydpi status turkeydpi health turkeydpi stats turkeydpi stop ```