DPI is the technology governments and ISPs use to identify and block VPN traffic. Learn how it works, why standard VPNs fail against it, and how obfuscation protocols defeat it.
Deep Packet Inspection (DPI) is a network traffic analysis technique that examines the contents of data packets as they pass through a checkpoint. Unlike simple packet filtering that only looks at headers (source, destination, port), DPI inspects the actual payload of each packet to determine what kind of traffic it carries.
Think of it like a postal system: basic filtering checks the address on the envelope, while DPI opens the envelope and reads the letter inside. This allows network operators to identify not just where traffic is going, but what it is — a web page, a video stream, a VPN tunnel, or a file download.
DPI systems use several techniques in combination to detect VPN connections with high accuracy.
Every protocol has a unique signature. OpenVPN starts with a specific byte sequence (0x00-0x0F for control channel). WireGuard uses a distinctive 3-way handshake with fixed-size messages. DPI systems maintain a database of these signatures and match incoming packets against them in real time.
Even when encrypted, VPN traffic has statistical properties that differ from regular web browsing. DPI can analyze packet size distribution, timing intervals, and entropy levels. A constant stream of uniformly-sized encrypted packets on a single connection is a strong signal of VPN usage, as normal HTTPS browsing creates variable-sized packets with irregular timing.
Advanced DPI systems (like China's GFW) don't just passively observe — they actively probe suspicious servers. If DPI suspects an IP address is running a VPN, it sends specially crafted packets to the server. A VPN server will respond differently than a regular web server, confirming the DPI's suspicion and triggering a block.
Modern DPI systems use ML models trained on labeled traffic datasets. These classifiers can identify VPN traffic even when traditional signatures are obscured, by recognizing subtle patterns in connection behavior, TLS certificate characteristics, and traffic flow dynamics.
Most VPN protocols were designed for privacy and security, but not for stealth. They make no attempt to disguise their traffic, making them trivial targets for DPI.
| Protocol | DPI Detection Method | Blocked? |
|---|---|---|
| OpenVPN | Unique opcode in first byte, TLS handshake with custom extensions | Easily blocked |
| WireGuard | Fixed handshake size (148 bytes), distinctive message types 1-4 | Easily blocked |
| IPSec/IKEv2 | IKE negotiation on UDP 500/4500, ESP protocol number 50 | Easily blocked |
| SSTP | HTTPS on port 443 but SSL certificate reveals SSTP headers | Detectable |
| star WireGuard + Amnezia | Indistinguishable from HTTPS — no known DPI signature | Undetected |
Obfuscation protocols work by transforming VPN traffic to be indistinguishable from allowed traffic types. Here's how VPNWG's Amnezia obfuscation layer works:
WireGuard's fixed-size handshake messages are padded with random data to variable lengths that match typical HTTPS packet size distributions. This eliminates the statistical fingerprint that DPI relies on.
Protocol-specific headers and magic bytes are encrypted or replaced with benign-looking data. The first bytes of each packet — which DPI checks first — reveal nothing about the actual protocol being used.
Small random delays are introduced between packets to break up the regular timing patterns that VPN traffic typically exhibits. The resulting traffic flow mimics the bursty, irregular pattern of normal web browsing.
The entire obfuscated stream is wrapped in a valid TLS session, making it appear as standard HTTPS traffic to any network observer. DPI sees a perfectly normal TLS 1.3 connection to what looks like a regular web server.
DPI-based VPN blocking is deployed in many countries. VPNWG is designed to work in all of them.
Stop fighting DPI with protocols that were never designed for stealth. VPNWG's Amnezia obfuscation makes your VPN traffic invisible to even the most advanced inspection systems.