A simple and fast anti-censorship tool written in Go
Go to file
Dmitry Afanasiev 1a4c441df9 support snap
2024-09-13 09:13:55 +03:00
_docs support snap 2024-09-13 09:13:55 +03:00
.github chore: increase the value of days-before-issue-close 2024-08-29 22:10:56 +09:00
cmd/spoofdpi chore: add quiet option to arguments (#234) 2024-09-08 22:43:09 +09:00
dns feat: DNS. Add the ability to disable version 6 address resolution (#240) 2024-09-08 22:45:24 +09:00
packet fix: packet processing for http request (#230) 2024-09-03 16:07:11 +09:00
proxy refactor: correction in debugging messages (#238) 2024-09-08 17:38:59 +09:00
snap support snap 2024-09-13 09:13:55 +03:00
util feat: DNS. Add the ability to disable version 6 address resolution (#240) 2024-09-08 22:45:24 +09:00
version chore: prepare for the next release 2024-09-08 22:49:16 +09:00
.gitignore Add .idea dir created by JetBrains IDEs to .gitignore. (#167) 2024-08-21 03:24:31 +09:00
Dockerfile chore: use scratch image for Dockerfile instead of distroless (#226) 2024-09-03 16:15:49 +09:00
go.mod chore: refactor logging (#182) 2024-08-22 17:49:05 +09:00
go.sum chore: refactor logging (#182) 2024-08-22 17:49:05 +09:00
install.sh chore: rename the name of binary to spoofdpi 2024-08-27 12:17:35 +09:00
LICENSE Update LICENSE 2023-02-17 01:53:03 +09:00
README.md docs: sync usage 2024-09-08 22:57:57 +09:00

SpoofDPI

Read in other Languages: 🇬🇧English, 🇰🇷한국어, 🇨🇳简体中文, 🇷🇺Русский, 🇯🇵日本語

A simple and fast software designed to bypass Deep Packet Inspection.

image

Installation

See the installation guide for SpoofDPI here.

Packaging status

Usage

Usage: spoofdpi [options...]
  -addr string
        listen address (default "127.0.0.1")
  -debug
        enable debug output
  -dns-addr string
        dns address (default "8.8.8.8")
  -dns-ipv4-only
        resolve only version 4 addresses
  -dns-port value
        port number for dns (default 53)
  -enable-doh
        enable 'dns-over-https'
  -pattern value
        bypass DPI only on packets matching this regex pattern; can be given multiple times
  -port value
        port (default 8080)
  -silent
        do not show the banner and server information at start up
  -system-proxy
        enable system-wide proxy (default true)
  -timeout value
        timeout in milliseconds; no timeout when not given
  -v    print spoofdpi's version; this may contain some other relevant information
  -window-size value
        chunk size, in number of bytes, for fragmented client hello,
        try lower values if the default value doesn't bypass the DPI;
        when not given, the client hello packet will be sent in two parts:
        fragmentation for the first data packet and the rest

If you are using any vpn extensions such as Hotspot Shield in Chrome browser, go to Settings > Extensions, and disable them.

OSX

Run spoofdpi and it will automatically set your proxy

Linux

Run spoofdpi and open your favorite browser with proxy option

google-chrome --proxy-server="http://127.0.0.1:8080"

How it works

HTTP

Since most websites in the world now support HTTPS, SpoofDPI doesn't bypass Deep Packet Inspections for HTTP requests, However, it still serves proxy connection for all HTTP requests.

HTTPS

Although TLS encrypts every handshake process, the domain names are still shown as plaintext in the Client hello packet. In other words, when someone else looks on the packet, they can easily guess where the packet is headed to. The domain name can offer significant information while DPI is being processed, and we can actually see that the connection is blocked right after sending Client hello packet. I had tried some ways to bypass this and found out that it seemed like only the first chunk gets inspected when we send the Client hello packet split into chunks. What SpoofDPI does to bypass this is to send the first 1 byte of a request to the server, and then send the rest.

Inspirations

Green Tunnel by @SadeghHayeri
GoodbyeDPI by @ValdikSS