2023-02-15 09:52:14 +00:00
**⭐PRs or any form of contribution will be appreciated⭐**
2023-02-15 09:24:46 +00:00
2022-01-04 08:57:53 +00:00
# SpoofDPI
2023-02-08 05:04:44 +00:00
2024-08-06 22:47:32 +00:00
Read in other Languages: [🇬🇧English ](https://github.com/xvzc/SpoofDPI ), [🇰🇷한국어 ](https://github.com/xvzc/SpoofDPI/blob/main/_docs/readme_ko.md ), [🇨🇳简体中文 ](https://github.com/xvzc/SpoofDPI/blob/main/_docs/readme_zh-cn.md ), [🇷🇺Русский ](https://github.com/xvzc/SpoofDPI/blob/main/_docs/readme_ru.md ), [🇯🇵日本語 ](https://github.com/xvzc/SpoofDPI/blob/main/_docs/readme_ja.md )
2022-01-04 13:08:44 +00:00
2024-08-04 19:02:56 +00:00
A simple and fast software designed to bypass **Deep Packet Inspection**
2022-01-04 09:12:38 +00:00
![image ](https://user-images.githubusercontent.com/45588457/148035986-8b0076cc-fefb-48a1-9939-a8d9ab1d6322.png )
2022-01-03 08:43:30 +00:00
2022-01-12 09:33:49 +00:00
# Installation
2022-01-12 13:34:26 +00:00
## Binary
2024-08-04 19:02:56 +00:00
SpoofDPI will be installed in `~/.spoof-dpi/bin` .
2022-01-12 13:34:26 +00:00
To run SpoofDPI in any directory, add the line below to your `~/.bashrc || ~/.zshrc || ...`
```
export PATH=$PATH:~/.spoof-dpi/bin
```
2024-07-27 02:12:11 +00:00
---
2024-07-27 02:10:32 +00:00
```bash
2024-08-04 19:02:56 +00:00
# macOS Intel
2024-07-27 02:10:32 +00:00
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s darwin-amd64
2024-07-27 02:14:17 +00:00
2024-08-04 19:02:56 +00:00
# macOS Apple Silicon
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s darwin-arm64
2024-07-27 02:14:17 +00:00
# linux-amd64
2024-07-27 02:10:32 +00:00
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-amd64
2024-07-27 02:14:17 +00:00
# linux-arm
2024-07-27 02:10:32 +00:00
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-arm
2024-07-27 02:14:17 +00:00
# linux-arm64
2024-07-27 02:10:32 +00:00
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-arm64
2024-07-27 02:14:17 +00:00
# linux-mips
2024-07-27 02:10:32 +00:00
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-mips
2024-07-27 02:14:17 +00:00
# linux-mipsle
2024-07-27 02:10:32 +00:00
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-mipsle
2022-01-12 09:51:51 +00:00
```
2024-07-27 02:10:32 +00:00
2024-07-27 02:14:17 +00:00
2022-01-12 13:34:26 +00:00
## Go
2024-08-06 08:48:10 +00:00
You can also install SpoofDPI with `go install`
```bash
$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi@latest
```
2022-01-03 08:45:15 +00:00
2022-01-12 13:34:26 +00:00
## Git
2024-08-04 19:02:56 +00:00
You can also build your own
2024-08-06 08:48:10 +00:00
```bash
$ git clone https://github.com/xvzc/SpoofDPI.git
$ cd SpoofDPI
$ go build ./cmd/...
```
2022-01-04 09:11:43 +00:00
2022-01-12 09:35:54 +00:00
# Usage
```
Usage: spoof-dpi [options...]
2024-07-21 08:21:56 +00:00
-addr string
2024-07-27 02:00:53 +00:00
listen address (default "127.0.0.1")
2024-07-21 08:21:56 +00:00
-debug
2024-07-27 02:00:53 +00:00
enable debug output
2024-07-21 08:21:56 +00:00
-dns-addr string
2024-07-27 02:00:53 +00:00
dns address (default "8.8.8.8")
2024-07-21 08:21:56 +00:00
-dns-port int
2024-07-27 02:00:53 +00:00
port number for dns (default 53)
2024-07-21 08:21:56 +00:00
-enable-doh
2024-08-06 08:48:10 +00:00
enable 'dns-over-https'
2024-07-21 08:21:56 +00:00
-no-banner
2024-07-27 02:00:53 +00:00
disable banner
2024-08-06 08:48:10 +00:00
-pattern value
bypass DPI only on packets matching this regex pattern; can be given multiple times
2024-07-21 08:21:56 +00:00
-port int
port (default 8080)
2024-08-05 08:07:53 +00:00
-system-proxy
enable system-wide proxy (default true)
2024-07-21 08:21:56 +00:00
-timeout int
2024-08-06 08:48:10 +00:00
timeout in milliseconds; no timeout when not given
-v print spoof-dpi's version; this may contain some other relevant information
2024-07-27 02:00:53 +00:00
-window-size int
chunk size, in number of bytes, for fragmented client hello,
try lower values if the default value doesn't bypass the DPI;
2024-08-03 06:58:17 +00:00
when not given, the client hello packet will be sent in two parts:
fragmentation for the first data packet and the rest
2022-01-12 09:35:54 +00:00
```
2024-08-04 19:02:56 +00:00
> If you are using any vpn extensions such as Hotspot Shield in Chrome browser,
2022-01-11 17:41:46 +00:00
go to Settings > Extensions, and disable them.
2022-01-12 09:33:18 +00:00
2022-01-04 10:18:15 +00:00
### OSX
2024-08-06 08:48:10 +00:00
Run `spoof-dpi` and it will automatically set your proxy
2022-01-03 08:45:15 +00:00
2022-01-04 10:18:15 +00:00
### Linux
2024-08-06 08:48:10 +00:00
Run `spoof-dpi` and open your favorite browser with proxy option
```bash
google-chrome --proxy-server="http://127.0.0.1:8080"
```
2022-01-03 08:43:30 +00:00
2022-01-04 10:18:15 +00:00
# How it works
### HTTP
Since most of websites in the world now support HTTPS, SpoofDPI doesn't bypass Deep Packet Inspections for HTTP requets, However It still serves proxy connection for all HTTP requests.
### HTTPS
2024-08-04 19:02:56 +00:00
Although TLS 1.3 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.
2022-01-04 11:21:53 +00:00
The domain name can offer a significant information while DPI is being processed, and we can actually see that the connection is blocked right after sending Client hello packet.
2024-08-04 19:02:56 +00:00
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 splited in chunks.
What SpoofDPI does to bypass this is to send the first 1 byte of a request to the server,
2022-01-04 10:18:15 +00:00
and then send the rest.
> SpoofDPI doesn't decrypt your HTTPS requests, and that's why we don't need the SSL certificates.
2022-01-04 11:18:57 +00:00
# Inspirations
2024-08-04 19:02:56 +00:00
[Green Tunnel ](https://github.com/SadeghHayeri/GreenTunnel ) by @SadeghHayeri
2022-01-11 17:41:46 +00:00
[GoodbyeDPI ](https://github.com/ValdikSS/GoodbyeDPI ) by @ValdikSS