TurkeyDPI
TurkeyDPI is a powerful DPI (Deep Packet Inspection) bypass tool specifically designed for Turkish ISPs. It uses advanced packet fragmentation techniques to evade SNI-based blocking and restore access to censored websites.The Problem
Turkish ISPs use Deep Packet Inspection to analyze your traffic and block access to certain websites. When you connect to blocked sites likediscord.com, the DPI system reads the Server Name Indication (SNI) in plaintext during the TLS handshake:
discord.com in plaintext, matches it against a blocklist, and kills the connection.
The Solution
TurkeyDPI exploits a fundamental property of TCP: it’s a stream protocol. The server doesn’t care if data arrives in one packet or twenty—it reassembles everything. But DPI boxes are stateless and inspect packets individually.How Fragmentation Works
Detect TLS/HTTP Traffic
TurkeyDPI identifies TLS ClientHello messages and HTTP requests containing SNI or Host headers.
Fragment Packets
The proxy splits packets at strategic positions to prevent DPI from extracting the hostname:
Key Features
SNI Fragmentation
Splits TLS ClientHello packets to hide the Server Name Indication from DPI inspection.
HTTP Host Fragmentation
Fragments HTTP Host headers across multiple TCP segments to evade detection.
ISP Presets
Pre-configured profiles optimized for Turk Telekom, Vodafone, and Superonline.
DNS-over-HTTPS
Encrypted DNS resolution through Cloudflare to bypass ISP DNS poisoning.
Zero Configuration
Works out of the box with sensible defaults. Just run and set your browser proxy.
High Performance
Written in Rust with async I/O for minimal latency and maximum throughput.
Bypass Techniques
TurkeyDPI employs multiple evasion strategies:1. SNI Fragmentation
Splits the TLS ClientHello at critical positions to prevent DPI from parsing the SNI extension:2. HTTP Host Header Fragmentation
For plain HTTP traffic, splits the Host header value:3. Timing Jitter
Some DPI boxes buffer packets briefly hoping to reassemble. Adding delays defeats this:4. DNS-over-HTTPS
ISPs also poison DNS queries. TurkeyDPI uses encrypted DNS:Quick Start
Get started in under 60 seconds:Installation
Install TurkeyDPI using Cargo or build from source
Quick Start Guide
Run your first bypass proxy and configure your browser
Architecture
TurkeyDPI is built with a modular architecture:TurkeyDPI is designed specifically for Turkish ISPs but the techniques work against any stateless DPI system that inspects individual packets.
How It Works - Deep Dive
TLS Record Structure
Every TLS record follows this format:Fragment Strategy
The split point is critical. Turkish DPI specifically looks for:- Content type
0x16(handshake) - Handshake type
0x01(ClientHello) - SNI extension with readable hostname
ISP Presets
TurkeyDPI includes optimized configurations for major Turkish ISPs. Each preset uses different fragmentation strategies:| Preset | TLS Split | Max Segment | Fragment Delay | Best For |
|---|---|---|---|---|
aggressive | 0 (SNI middle) | 5 bytes | 10ms | Maximum bypass effectiveness |
turk-telekom | 2 bytes | 20 bytes | 0ms | Turk Telekom networks |
vodafone | 3 bytes | 30 bytes | 100μs | Vodafone Turkey |
superonline | 1 byte | 15 bytes | 0ms | Superonline ISP |
Why Rust?
TurkeyDPI is written in Rust for:- Performance: Zero-cost abstractions and no garbage collection
- Safety: Memory safety without runtime overhead
- Concurrency: Tokio async runtime handles thousands of connections
- Reliability: Type system catches bugs at compile time
License
TurkeyDPI is open source under the MIT License.Next Steps
Install
Get TurkeyDPI installed on your system
Quick Start
Run the bypass proxy in 60 seconds
GitHub
View source code and contribute