https://github.com/ValdikSS/GoodbyeDPI Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Copilot + Packages + Security + Code review + Issues + Discussions + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Skills + GitHub Sponsors + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} ValdikSS / GoodbyeDPI Public * Notifications * Fork 701 * Star 7k GoodbyeDPI -- Deep Packet Inspection circumvention utility (for Windows) ntc.party/c/community-software/goodbyedpi License Apache-2.0 license 7k stars 701 forks Star Notifications * Code * Issues 45 * Pull requests 4 * Actions * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Wiki * Security * Insights ValdikSS/GoodbyeDPI This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 6 branches 27 tags Code Latest commit @ValdikSS ValdikSS Print correct set-ttl/auto-ttl mode in the status ... 4f18a73 Mar 31, 2022 Print correct set-ttl/auto-ttl mode in the status 4f18a73 Git stats * 176 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github Merge branch 'windivert2' Mar 21, 2022 src Print correct set-ttl/auto-ttl mode in the status Mar 31, 2022 .editorconfig Added .editorconfig May 16, 2018 LICENSE Initial commit May 16, 2017 README.md Add forgotten default max-payload value in the README Jan 6, 2022 View code [ ] GoodbyeDPI -- Deep Packet Inspection circumvention utility Quick start How to use How does it work Passive DPI Active DPI How to build from source How to install as Windows Service Known issues Similar projects Kudos README.md 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 -r replace Host with hoSt -s remove space between host header and its value -m mix Host header case (test.com -> tEsT.cOm) -f set HTTP fragmentation to value -k enable HTTP persistent (keep-alive) fragmentation and set it to value -n do not wait for first segment ACK when -k is enabled -e 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 additional TCP port to perform fragmentation on (and HTTP tricks with -w) --ip-id handle additional IP ID (decimal, drop redirects and TCP RSTs with this ID). This option can be supplied multiple times. --dns-addr redirect UDP DNS requests to the supplied IP address (experimental) --dns-port redirect UDP DNS requests to the supplied port (53 by default) --dnsv6-addr redirect UDPv6 DNS requests to the supplied IPv6 address (experimental) --dnsv6-port redirect UDPv6 DNS requests to the supplied port (53 by default) --dns-verb print verbose DNS redirection messages --blacklist 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. --set-ttl 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 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 (this is the default) -6 -f 2 -e 2 --wrong-seq --reverse-frag --max-payload 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 resover 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 with hoSt * 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. * [DEL:Some SSL/TLS stacks unable to process fragmented ClientHello packets, and HTTPS websites won't open. Bug: #4, #64.:DEL] Fragmentation issues are fixed in v0.1.7. * [DEL:ESET Antivirus is incompatible with WinDivert driver #91. This is most probably antivirus bug, not WinDivert.:DEL] Similar projects * zapret by @bol-van (for Linux). * Green Tunnel by @SadeghHayeri (for MacOS, Linux and Windows). * DPITunnel 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) 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. About GoodbyeDPI -- Deep Packet Inspection circumvention utility (for Windows) ntc.party/c/community-software/goodbyedpi Topics dpi anticensorship censorship-circumvention deep-packet-inspection Resources Readme License Apache-2.0 license Stars 7k stars Watchers 275 watching Forks 701 forks Releases 27 GoodbyeDPI v0.2.2 Latest Mar 21, 2022 + 26 releases Contributors 7 * @ValdikSS * @KOLANICH * @pash7ka * @r4sas * @beatcracker * @alisharifi76 * @msekmfb Languages * C 99.0% * Makefile 1.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.