2022-01-04 08:57:53 +00:00
# SpoofDPI
2023-02-08 05:04:44 +00:00
2024-08-14 23:54:46 +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-26 11:54:54 +00:00
A simple and fast software designed to bypass **Deep Packet Inspection** .
2024-08-04 19:02:56 +00:00
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
2024-08-30 08:02:03 +00:00
See the installation guide for SpoofDPI [here ](https://github.com/xvzc/SpoofDPI/blob/main/_docs/INSTALL.md ).
2022-01-04 09:11:43 +00:00
2024-08-30 08:50:37 +00:00
< a href = "https://repology.org/project/spoofdpi/versions" >
< img src = "https://repology.org/badge/vertical-allrepos/spoofdpi.svg?columns=1" alt = "Packaging status" >
< / a >
2022-01-12 09:35:54 +00:00
# Usage
```
2024-08-27 03:17:35 +00:00
Usage: spoofdpi [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-09-08 13:57:57 +00:00
-dns-ipv4-only
resolve only version 4 addresses
-dns-port value
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'
-pattern value
bypass DPI only on packets matching this regex pattern; can be given multiple times
2024-09-08 13:57:57 +00:00
-port value
2024-07-21 08:21:56 +00:00
port (default 8080)
2024-09-08 13:43:09 +00:00
-silent
do not show the banner and server information at start up
2024-08-05 08:07:53 +00:00
-system-proxy
enable system-wide proxy (default true)
2024-09-08 13:57:57 +00:00
-timeout value
2024-08-06 08:48:10 +00:00
timeout in milliseconds; no timeout when not given
2024-08-27 03:17:35 +00:00
-v print spoofdpi's version; this may contain some other relevant information
2024-09-08 13:57:57 +00:00
-window-size value
2024-07-27 02:00:53 +00:00
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-27 03:17:35 +00:00
Run `spoofdpi` 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-27 03:17:35 +00:00
Run `spoofdpi` and open your favorite browser with proxy option
2024-08-06 08:48:10 +00:00
```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
2024-08-27 08:24:56 +00:00
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.
2022-01-04 10:18:15 +00:00
### HTTPS
2024-08-07 04:30:32 +00:00
Although TLS encrypts every handshake process, the domain names are still shown as plaintext in the Client hello packet.
2024-08-04 19:02:56 +00:00
In other words, when someone else looks on the packet, they can easily guess where the packet is headed to.
2024-08-27 08:24:56 +00:00
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.
2024-08-04 19:02:56 +00:00
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.
2022-01-04 11:18:57 +00:00
# Inspirations
2024-08-26 11:54:54 +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