From a093c0a07bec0d47cdc5436c493836335477b583 Mon Sep 17 00:00:00 2001 From: Igor Arkhipov Date: Sun, 4 Aug 2024 22:02:56 +0300 Subject: [PATCH] add binary generation for Apple Silicon (darwin/amd64) --- make-releases.sh | 2 +- readme.md | 40 ++++++++++++++++++++-------------------- readme_ru.md | 25 ++++++++++++++----------- readme_zh-cn.md | 29 ++++++++++++++++------------- 4 files changed, 51 insertions(+), 45 deletions(-) diff --git a/make-releases.sh b/make-releases.sh index 492cbab..48f80de 100644 --- a/make-releases.sh +++ b/make-releases.sh @@ -2,7 +2,7 @@ VERSION="v0.10.4" -for osarch in 'darwin/amd64' 'linux/amd64' 'linux/arm' 'linux/arm64' 'linux/mips' 'linux/mipsle'; do +for osarch in 'darwin/amd64' 'darwin/arm64' 'linux/amd64' 'linux/arm' 'linux/arm64' 'linux/mips' 'linux/mipsle'; do GOOS=${osarch%/*} GOARCH=${osarch#*/} go build -ldflags="-w -s -X main.VERSION=${VERSION}" github.com/xvzc/SpoofDPI/cmd/spoof-dpi && tar -zcvf spoof-dpi-${osarch%/*}-${osarch#*/}.tar.gz ./spoof-dpi && rm -rf ./spoof-dpi diff --git a/readme.md b/readme.md index 8c3be51..dc4e633 100644 --- a/readme.md +++ b/readme.md @@ -4,22 +4,25 @@ Read in other Languages: [🇬🇧English](https://github.com/xvzc/SpoofDPI), [🇰🇷한국어](https://github.com/xvzc/SpoofDPI/blob/main/readme_ko.md), [🇨🇳简体中文](https://github.com/xvzc/SpoofDPI/blob/main/readme_zh-cn.md), [🇷🇺Русский](https://github.com/xvzc/SpoofDPI/blob/main/readme_ru.md) -A simple and fast software designed to bypass **Deep Packet Inspection** - +A simple and fast software designed to bypass **Deep Packet Inspection** + ![image](https://user-images.githubusercontent.com/45588457/148035986-8b0076cc-fefb-48a1-9939-a8d9ab1d6322.png) # Installation ## Binary -SpoofDPI will be installed in `~/.spoof-dpi/bin`. +SpoofDPI will be installed in `~/.spoof-dpi/bin`. To run SpoofDPI in any directory, add the line below to your `~/.bashrc || ~/.zshrc || ...` ``` export PATH=$PATH:~/.spoof-dpi/bin ``` --- ```bash -# OSX +# macOS Intel curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s darwin-amd64 +# macOS Apple Silicon +curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s darwin-arm64 + # linux-amd64 curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-amd64 @@ -38,15 +41,15 @@ curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bas ## Go -You can also install SpoofDPI with **go install** -`$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi@latest` +You can also install SpoofDPI with **go install** +`$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi@latest` > Remember that $GOPATH should be set in your $PATH ## Git -You can also build your own -`$ git clone https://github.com/xvzc/SpoofDPI.git` -`$ cd SpoofDPI` -`$ go build ./cmd/...` +You can also build your own +`$ git clone https://github.com/xvzc/SpoofDPI.git` +`$ cd SpoofDPI` +`$ go build ./cmd/...` # Usage ``` @@ -78,14 +81,14 @@ Usage: spoof-dpi [options...] 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, +> If you are using any vpn extensions such as Hotspot Shield in Chrome browser, go to Settings > Extensions, and disable them. ### OSX Run `$ spoof-dpi` and it will automatically set your proxy ### Linux -Run `$ spoof-dpi` and open your favorite browser with proxy option +Run `$ spoof-dpi` and open your favorite browser with proxy option `google-chrome --proxy-server="http://127.0.0.1:8080"` # How it works @@ -93,17 +96,14 @@ Run `$ spoof-dpi` and open your favorite browser with proxy option 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 - 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. + 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. 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. - 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, + 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, and then send the rest. > SpoofDPI doesn't decrypt your HTTPS requests, and that's why we don't need the SSL certificates. # Inspirations -[Green Tunnel](https://github.com/SadeghHayeri/GreenTunnel) by @SadeghHayeri +[Green Tunnel](https://github.com/SadeghHayeri/GreenTunnel) by @SadeghHayeri [GoodbyeDPI](https://github.com/ValdikSS/GoodbyeDPI) by @ValdikSS - - - diff --git a/readme_ru.md b/readme_ru.md index 6377dd3..fb37466 100644 --- a/readme_ru.md +++ b/readme_ru.md @@ -4,22 +4,25 @@ Можете прочитать на других языках: [🇬🇧English](https://github.com/xvzc/SpoofDPI), [🇰🇷한국어](https://github.com/xvzc/SpoofDPI/blob/main/readme_ko.md), [🇨🇳简体中文](https://github.com/xvzc/SpoofDPI/blob/main/readme_zh-cn.md), [🇷🇺Русский](https://github.com/xvzc/SpoofDPI/blob/main/readme_ru.md) -Простое и быстрое ПО, созданное для обхода **Deep Packet Inspection** - +Простое и быстрое ПО, созданное для обхода **Deep Packet Inspection** + ![image](https://user-images.githubusercontent.com/45588457/148035986-8b0076cc-fefb-48a1-9939-a8d9ab1d6322.png) # Установка ## Бинарник -SpoofDPI будет установлен в директорию `~/.spoof-dpi/bin`. +SpoofDPI будет установлен в директорию `~/.spoof-dpi/bin`. Чтобы запустить SpoofDPI в любой директории, добавьте строку ниже в `~/.bashrc || ~/.zshrc || ...` ``` export PATH=$PATH:~/.spoof-dpi/bin ``` --- ```bash -# OSX +# macOS Intel curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s darwin-amd64 +# macOS Apple Silicon +curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s darwin-arm64 + # linux-amd64 curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-amd64 @@ -37,16 +40,16 @@ curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bas ``` ## Go -Вы также можете установить SpoofDPI с помощью **go install** -`$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi` +Вы также можете установить SpoofDPI с помощью **go install** +`$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi` > Не забудьте, что $GOPATH должен быть установлен в Вашем $PATH ## Git Вы также можете собрать SpoofDPI -`$ git clone https://github.com/xvzc/SpoofDPI.git` -`$ cd SpoofDPI` -`$ go build ./cmd/...` +`$ git clone https://github.com/xvzc/SpoofDPI.git` +`$ cd SpoofDPI` +`$ go build ./cmd/...` # Использование ``` @@ -78,7 +81,7 @@ curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bas when not given, the client hello packet will be sent in two parts: fragmentation for the first data packet and the rest ``` -> Если Вы используете любые VPN-расширения по типу Hotspot Shield в браузере +> Если Вы используете любые VPN-расширения по типу Hotspot Shield в браузере Chrome, зайдите в Настройки > Расширения и отключите их. ### OSX @@ -98,5 +101,5 @@ curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bas > SpoofDPI не расшифровывает Ваши HTTPS запросы, так что нам не нужны SSL сертификаты. # Вдохновение -[Green Tunnel](https://github.com/SadeghHayeri/GreenTunnel) от @SadeghHayeri +[Green Tunnel](https://github.com/SadeghHayeri/GreenTunnel) от @SadeghHayeri [GoodbyeDPI](https://github.com/ValdikSS/GoodbyeDPI) от @ValdikSS diff --git a/readme_zh-cn.md b/readme_zh-cn.md index 123a25c..c1f3727 100644 --- a/readme_zh-cn.md +++ b/readme_zh-cn.md @@ -5,7 +5,7 @@ 选择语言: [🇬🇧English](https://github.com/xvzc/SpoofDPI), [🇰🇷한국어](https://github.com/xvzc/SpoofDPI/blob/main/readme_ko.md), [🇨🇳简体中文](https://github.com/xvzc/SpoofDPI/blob/main/readme_zh-cn.md), [🇷🇺Русский](https://github.com/xvzc/SpoofDPI/blob/main/readme_ru.md) 规避**深度包检测**的简单工具 - + ![image](https://user-images.githubusercontent.com/45588457/148035986-8b0076cc-fefb-48a1-9939-a8d9ab1d6322.png) # 安装 @@ -19,9 +19,12 @@ export PATH=$PATH:~/.spoof-dpi/bin ``` --- ```bash -# OSX +# macOS Intel curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s darwin-amd64 +# macOS Apple Silicon +curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s darwin-arm64 + # linux-amd64 curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux-amd64 @@ -40,15 +43,15 @@ curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bas ## Go 也可以用 **go install** 安装 - -`$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi` + +`$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi` > 记得确认 $GOPATH 在你的 $PATH 中 - + ## Git -You can also build your own -`$ git clone https://github.com/xvzc/SpoofDPI.git` -`$ cd SpoofDPI` -`$ go build ./cmd/...` +You can also build your own +`$ git clone https://github.com/xvzc/SpoofDPI.git` +`$ cd SpoofDPI` +`$ go build ./cmd/...` # 使用方法 @@ -88,7 +91,7 @@ Usage: spoof-dpi [options...] 运行 `$ spoof-dpi` ,然后它会自动设置自身为代理 ### Linux -运行 `$ spoof-dpi` 然后加上代理参数运行你的浏览器 +运行 `$ spoof-dpi` 然后加上代理参数运行你的浏览器 `google-chrome --proxy-server="http://127.0.0.1:8080"` @@ -100,10 +103,10 @@ Usage: spoof-dpi [options...] ### HTTPS 尽管 TLS 1.3加密了握手的每一步,但是在 Client Hello 中的域名仍然是明文的。因此如果有人看到 Client Hello 包就可以知道你在连接什么网站。这给 DPI 提供了很大方便,我们也看到连接在 Client Hello 之后就会被屏蔽掉。我之前尝试了规避这种审查,并发现,如果把 Client Hello 分包,只有第一个 chunk 会被检测。SpoofDPI 只要在第一个分包发送 1 byte,然后再发送其他部分就能规避。 - + > SpoofDPI 不会解密 HTTPS 请求,所以您无需安装任何 TLS 证书。 - + # 启发 -[Green Tunnel](https://github.com/SadeghHayeri/GreenTunnel) by @SadeghHayeri +[Green Tunnel](https://github.com/SadeghHayeri/GreenTunnel) by @SadeghHayeri [GoodbyeDPI](https://github.com/ValdikSS/GoodbyeDPI) by @ValdikSS