GoodbyeDPI
GoodbyeDPI — Deep Packet Inspection circumvention utility (for Windows)
Top Related Projects
DPI bypass multi platform
Powerful and extensible proxy server with anti-censorship functionality
GreenTunnel is an anti-censorship utility designed to bypass the DPI system that is put in place by various ISPs to block access to certain websites.
Russian ISP blocking type checker NOTE: NOT WORKING CURRENTLY. ВНИМАНИЕ: НЕ РАБОТАЕТ НА ТЕКУЩИЙ МОМЕНТ
Quick Overview
GoodbyeDPI is an open-source tool designed to bypass Deep Packet Inspection (DPI) systems used for internet censorship. It works by manipulating network packets to evade detection and blocking mechanisms employed by ISPs and governments, allowing users to access restricted content without using a VPN or proxy.
Pros
- Effectively bypasses many DPI systems without the need for a VPN or proxy
- Lightweight and easy to use, with minimal system resource requirements
- Open-source, allowing for community contributions and audits
- Supports various DPI circumvention techniques, making it adaptable to different censorship methods
Cons
- Primarily designed for Windows operating systems, limiting its availability on other platforms
- May require administrative privileges to run, which could be a security concern for some users
- Effectiveness can vary depending on the specific DPI implementation used by ISPs or governments
- Regular updates may be necessary to keep up with evolving DPI techniques
Getting Started
To use GoodbyeDPI:
- Download the latest release from the GitHub repository.
- Extract the files to a folder on your computer.
- Run the appropriate executable for your system (e.g.,
goodbyedpi.exe
for 32-bit orgoodbyedpi-x64.exe
for 64-bit). - Choose the desired DPI circumvention mode by using command-line arguments. For example:
goodbyedpi.exe -1
This command runs GoodbyeDPI in the default mode, which should work for most cases.
For more advanced usage, you can combine different options:
goodbyedpi.exe -1 --blacklist blacklist.txt --dns-addr 1.1.1.1
This command runs GoodbyeDPI with a custom blacklist and specifies an alternative DNS server.
Refer to the project's README for a full list of available options and their descriptions.
Competitor Comparisons
DPI bypass multi platform
Pros of zapret
- More comprehensive approach to bypassing censorship, including DNS-level techniques
- Supports a wider range of operating systems, including Linux and OpenWrt
- Offers more customization options and configuration flexibility
Cons of zapret
- More complex setup and configuration process
- Requires root/admin privileges for full functionality
- May have a higher performance impact on the system
Code comparison
zapret:
iptables -t mangle -A ZAPRET_PREROUTING -p tcp --dport 80 \
-m string --string "Host:" --algo bm --to 65535 \
-j NFQUEUE --queue-num 200
GoodbyeDPI:
if (packet_data_len >= 16 && memcmp(packet_data, "\x16\x03\x01", 3) == 0) {
*should_reinject = 1;
return 1;
}
The zapret code snippet shows iptables rules for packet manipulation, while GoodbyeDPI uses C code for TLS handshake detection. This illustrates the different approaches: zapret operates at the network level, while GoodbyeDPI focuses on application-layer traffic analysis.
Powerful and extensible proxy server with anti-censorship functionality
Pros of PowerTunnel
- Cross-platform compatibility (Windows, macOS, Linux)
- User-friendly graphical interface
- Supports both HTTP and HTTPS protocols
Cons of PowerTunnel
- May have higher resource usage due to Java runtime
- Potentially slower performance compared to native C implementation
- Less granular control over DPI circumvention techniques
Code Comparison
PowerTunnel (Java):
public class PowerTunnel {
public static void main(String[] args) {
HttpProxyServer server = DefaultHttpProxyServer.bootstrap()
.withPort(8085)
.withFiltersSource(new HttpFiltersSourceAdapter() {
// ... filter implementation
}).start();
}
}
GoodbyeDPI (C):
int main(int argc, char *argv[]) {
parse_params(argc, argv);
init_ws2_32();
init_windivert();
// ... packet processing logic
return 0;
}
PowerTunnel uses Java's Littleproxy library for HTTP proxying, while GoodbyeDPI directly manipulates network packets using WinDivert. GoodbyeDPI's approach allows for lower-level control and potentially better performance, but PowerTunnel offers greater portability and ease of use.
GreenTunnel is an anti-censorship utility designed to bypass the DPI system that is put in place by various ISPs to block access to certain websites.
Pros of GreenTunnel
- Cross-platform compatibility (Windows, macOS, Linux)
- User-friendly CLI and GUI options
- Supports both HTTP and HTTPS protocols
Cons of GreenTunnel
- Less comprehensive DPI circumvention techniques
- May have lower performance compared to GoodbyeDPI
- Requires Node.js installation
Code Comparison
GreenTunnel (JavaScript):
const net = require('net');
const http = require('http');
const https = require('https');
const url = require('url');
GoodbyeDPI (C):
#include <windows.h>
#include <windivert.h>
#include <stdio.h>
#include <stdlib.h>
GreenTunnel uses Node.js modules for networking, while GoodbyeDPI utilizes Windows-specific libraries for low-level packet manipulation. This difference reflects their approaches: GreenTunnel operates at the application layer, while GoodbyeDPI works at the network layer.
GreenTunnel's JavaScript implementation makes it more accessible for developers familiar with web technologies, but may result in slower performance compared to GoodbyeDPI's C implementation. GoodbyeDPI's use of WinDivert allows for more precise packet manipulation, potentially providing better circumvention capabilities against sophisticated DPI systems.
Both projects aim to bypass Deep Packet Inspection (DPI) but employ different strategies. GreenTunnel focuses on cross-platform compatibility and ease of use, while GoodbyeDPI prioritizes performance and advanced circumvention techniques specifically for Windows systems.
Russian ISP blocking type checker NOTE: NOT WORKING CURRENTLY. ВНИМАНИЕ: НЕ РАБОТАЕТ НА ТЕКУЩИЙ МОМЕНТ
Pros of blockcheck
- Designed for network testing and diagnostics, providing a broader range of functionality
- Supports multiple protocols and services for comprehensive network analysis
- Written in Python, making it more accessible for contributions and modifications
Cons of blockcheck
- Less focused on DPI circumvention compared to GoodbyeDPI
- May require more setup and configuration for specific use cases
- Not optimized for real-time traffic manipulation
Code Comparison
blockcheck (Python):
def check_dns(host):
try:
socket.gethostbyname(host)
return True
except socket.error:
return False
GoodbyeDPI (C):
int dpi_desync_check_tcp(struct desync_check_ctx *ctx, const char *pkt, size_t pktlen) {
if (pktlen < sizeof(struct tcphdr))
return 0;
// ... (additional code)
}
The code snippets highlight the different approaches and languages used in each project. blockcheck focuses on network diagnostics using Python, while GoodbyeDPI is written in C for low-level packet manipulation and DPI circumvention.
blockcheck is better suited for general network testing and analysis, offering a wider range of features. GoodbyeDPI, on the other hand, is specifically designed for bypassing DPI systems with a focus on performance and real-time traffic manipulation.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
GoodbyeDPI â Deep Packet Inspection circumvention utility
This software designed to bypass Deep Packet Inspection systems found in many Internet Service Providers which block access to certain websites.
It handles DPI connected using optical splitter or port mirroring (Passive DPI) which do not block any data but just replying faster than requested destination, and Active DPI connected in sequence.
Windows 7, 8, 8.1, 10 or 11 with administrator privileges required.
Quick start
- For Russia: Download latest version from Releases page, unpack the file and run 1_russia_blacklist_dnsredir.cmd script.
- For other countries: Download latest version from Releases page, unpack the file and run 2_any_country_dnsredir.cmd.
These scripts launch GoodbyeDPI in recommended mode with DNS resolver redirection to Yandex DNS on non-standard port (to prevent DNS poisoning).
If it works â congratulations! You can use it as-is or configure further.
How to use
Download latest version from Releases page and run.
Usage: goodbyedpi.exe [OPTION...]
-p block passive DPI
-q block QUIC/HTTP3
-r replace Host with hoSt
-s remove space between host header and its value
-m mix Host header case (test.com -> tEsT.cOm)
-f <value> set HTTP fragmentation to value
-k <value> enable HTTP persistent (keep-alive) fragmentation and set it to value
-n do not wait for first segment ACK when -k is enabled
-e <value> set HTTPS fragmentation to value
-a additional space between Method and Request-URI (enables -s, may break sites)
-w try to find and parse HTTP traffic on all processed ports (not only on port 80)
--port <value> additional TCP port to perform fragmentation on (and HTTP tricks with -w)
--ip-id <value> handle additional IP ID (decimal, drop redirects and TCP RSTs with this ID).
This option can be supplied multiple times.
--dns-addr <value> redirect UDP DNS requests to the supplied IP address (experimental)
--dns-port <value> redirect UDP DNS requests to the supplied port (53 by default)
--dnsv6-addr <value> redirect UDPv6 DNS requests to the supplied IPv6 address (experimental)
--dnsv6-port <value> redirect UDPv6 DNS requests to the supplied port (53 by default)
--dns-verb print verbose DNS redirection messages
--blacklist <txtfile> perform circumvention tricks only to host names and subdomains from
supplied text file (HTTP Host/TLS SNI).
This option can be supplied multiple times.
--allow-no-sni perform circumvention if TLS SNI can't be detected with --blacklist enabled.
--frag-by-sni if SNI is detected in TLS packet, fragment the packet right before SNI value.
--set-ttl <value> activate Fake Request Mode and send it with supplied TTL value.
DANGEROUS! May break websites in unexpected ways. Use with care (or --blacklist).
--auto-ttl [a1-a2-m] activate Fake Request Mode, automatically detect TTL and decrease
it based on a distance. If the distance is shorter than a2, TTL is decreased
by a2. If it's longer, (a1; a2) scale is used with the distance as a weight.
If the resulting TTL is more than m(ax), set it to m.
Default (if set): --auto-ttl 1-4-10. Also sets --min-ttl 3.
DANGEROUS! May break websites in unexpected ways. Use with care (or --blacklist).
--min-ttl <value> minimum TTL distance (128/64 - TTL) for which to send Fake Request
in --set-ttl and --auto-ttl modes.
--wrong-chksum activate Fake Request Mode and send it with incorrect TCP checksum.
May not work in a VM or with some routers, but is safer than set-ttl.
--wrong-seq activate Fake Request Mode and send it with TCP SEQ/ACK in the past.
--native-frag fragment (split) the packets by sending them in smaller packets, without
shrinking the Window Size. Works faster (does not slow down the connection)
and better.
--reverse-frag fragment (split) the packets just as --native-frag, but send them in the
reversed order. Works with the websites which could not handle segmented
HTTPS TLS ClientHello (because they receive the TCP flow "combined").
--max-payload [value] packets with TCP payload data more than [value] won't be processed.
Use this option to reduce CPU usage by skipping huge amount of data
(like file transfers) in already established sessions.
May skip some huge HTTP requests from being processed.
Default (if set): --max-payload 1200.
LEGACY modesets:
-1 -p -r -s -f 2 -k 2 -n -e 2 (most compatible mode)
-2 -p -r -s -f 2 -k 2 -n -e 40 (better speed for HTTPS yet still compatible)
-3 -p -r -s -e 40 (better speed for HTTP and HTTPS)
-4 -p -r -s (best speed)
Modern modesets (more stable, more compatible, faster):
-5 -f 2 -e 2 --auto-ttl --reverse-frag --max-payload
-6 -f 2 -e 2 --wrong-seq --reverse-frag --max-payload
-7 -f 2 -e 2 --wrong-chksum --reverse-frag --max-payload
-8 -f 2 -e 2 --wrong-seq --wrong-chksum --reverse-frag --max-payload
-9 -f 2 -e 2 --wrong-seq --wrong-chksum --reverse-frag --max-payload -q (this is the default)
Note: combination of --wrong-seq and --wrong-chksum generates two different fake packets.
To check if your ISP's DPI could be circumvented, first make sure that your provider does not poison DNS answers by enabling "Secure DNS (DNS over HTTPS)" option in your browser.
- Chrome: Settings â Privacy and security â Use secure DNS â With: NextDNS
- Firefox: Settings â Network Settings â Enable DNS over HTTPS â Use provider: NextDNS
Then run the goodbyedpi.exe
executable without any options. If it works â congratulations! You can use it as-is or configure further, for example by using --blacklist
option if the list of blocked websites is known and available for your country.
If your provider intercepts DNS requests, you may want to use --dns-addr
option to a public DNS resolver running on non-standard port (such as Yandex DNS 77.88.8.8:1253
) or configure DNS over HTTPS/TLS using third-party applications.
Check the .cmd scripts and modify it according to your preference and network conditions.
How does it work
Passive DPI
Most Passive DPI send HTTP 302 Redirect if you try to access blocked website over HTTP and TCP Reset in case of HTTPS, faster than destination website. Packets sent by DPI usually have IP Identification field equal to 0x0000
or 0x0001
, as seen with Russian providers. These packets, if they redirect you to another website (censorship page), are blocked by GoodbyeDPI.
Active DPI
Active DPI is more tricky to fool. Currently the software uses 7 methods to circumvent Active DPI:
- TCP-level fragmentation for first data packet
- TCP-level fragmentation for persistent (keep-alive) HTTP sessions
- Replacing
Host
header withhoSt
- Removing space between header name and value in
Host
header - Adding additional space between HTTP Method (GET, POST etc) and URI
- Mixing case of Host header value
- Sending fake HTTP/HTTPS packets with low Time-To-Live value, incorrect checksum or incorrect TCP Sequence/Acknowledgement numbers to fool DPI and prevent delivering them to the destination
These methods should not break any website as they're fully compatible with TCP and HTTP standards, yet it's sufficient to prevent DPI data classification and to circumvent censorship. Additional space may break some websites, although it's acceptable by HTTP/1.1 specification (see 19.3 Tolerant Applications).
The program loads WinDivert driver which uses Windows Filtering Platform to set filters and redirect packets to the userspace. It's running as long as console window is visible and terminates when you close the window.
How to build from source
This project can be build using GNU Make and mingw. The only dependency is WinDivert.
To build x86 exe run:
make CPREFIX=i686-w64-mingw32- WINDIVERTHEADERS=/path/to/windivert/include WINDIVERTLIBS=/path/to/windivert/x86
And for x86_64:
make CPREFIX=x86_64-w64-mingw32- BIT64=1 WINDIVERTHEADERS=/path/to/windivert/include WINDIVERTLIBS=/path/to/windivert/amd64
How to install as Windows Service
Check examples in service_install_russia_blacklist.cmd
, service_install_russia_blacklist_dnsredir.cmd
and service_remove.cmd
scripts.
Modify them according to your own needs.
Known issues
- Horribly outdated Windows 7 installations are not able to load WinDivert driver due to missing support for SHA256 digital signatures. Install KB3033929 x86/x64, or better, update the whole system using Windows Update.
- Intel/Qualcomm Killer network cards:
Advanced Stream Detect
in Killer Control Center is incompabitle with GoodbyeDPI, disable it. Some SSL/TLS stacks unable to process fragmented ClientHello packets, and HTTPS websites won't open. Bug: #4, #64.Fragmentation issues are fixed in v0.1.7.ESET Antivirus is incompatible with WinDivert driver #91. This is most probably antivirus bug, not WinDivert.
Similar projects
- zapret by @bol-van (for MacOS, Linux and Windows)
- Green Tunnel by @SadeghHayeri (for MacOS, Linux and Windows)
- DPI Tunnel CLI by @zhenyolka (for Linux and routers)
- DPI Tunnel for Android by @zhenyolka (for Android)
- PowerTunnel by @krlvm (for Windows, MacOS and Linux)
- PowerTunnel for Android by @krlvm (for Android)
- SpoofDPI by @xvzc (for macOS and Linux)
- GhosTCP by @macronut (for Windows)
- ByeDPI for Linux/Windows + ByeDPIAndroid for Android (no root)
- youtubeUnblock by @Waujito (for OpenWRT/Entware routers and Linux)
Kudos
Thanks @basil00 for WinDivert. That's the main part of this program.
Thanks for every BlockCheck contributor. It would be impossible to understand DPI behaviour without this utility.
Top Related Projects
DPI bypass multi platform
Powerful and extensible proxy server with anti-censorship functionality
GreenTunnel is an anti-censorship utility designed to bypass the DPI system that is put in place by various ISPs to block access to certain websites.
Russian ISP blocking type checker NOTE: NOT WORKING CURRENTLY. ВНИМАНИЕ: НЕ РАБОТАЕТ НА ТЕКУЩИЙ МОМЕНТ
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot