add binary generation for Apple Silicon (darwin/amd64)

This commit is contained in:
Igor Arkhipov 2024-08-04 22:02:56 +03:00
parent 7b64d37b60
commit a093c0a07b
No known key found for this signature in database
4 changed files with 51 additions and 45 deletions

View File

@ -2,7 +2,7 @@
VERSION="v0.10.4" 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 && 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 && tar -zcvf spoof-dpi-${osarch%/*}-${osarch#*/}.tar.gz ./spoof-dpi &&
rm -rf ./spoof-dpi rm -rf ./spoof-dpi

View File

@ -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) 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) ![image](https://user-images.githubusercontent.com/45588457/148035986-8b0076cc-fefb-48a1-9939-a8d9ab1d6322.png)
# Installation # Installation
## Binary ## 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 || ...` To run SpoofDPI in any directory, add the line below to your `~/.bashrc || ~/.zshrc || ...`
``` ```
export PATH=$PATH:~/.spoof-dpi/bin export PATH=$PATH:~/.spoof-dpi/bin
``` ```
--- ---
```bash ```bash
# OSX # macOS Intel
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s darwin-amd64 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 # linux-amd64
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s 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 ## Go
You can also install SpoofDPI with **go install** You can also install SpoofDPI with **go install**
`$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi@latest` `$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi@latest`
> Remember that $GOPATH should be set in your $PATH > Remember that $GOPATH should be set in your $PATH
## Git ## Git
You can also build your own You can also build your own
`$ git clone https://github.com/xvzc/SpoofDPI.git` `$ git clone https://github.com/xvzc/SpoofDPI.git`
`$ cd SpoofDPI` `$ cd SpoofDPI`
`$ go build ./cmd/...` `$ go build ./cmd/...`
# Usage # Usage
``` ```
@ -78,14 +81,14 @@ Usage: spoof-dpi [options...]
when not given, the client hello packet will be sent in two parts: when not given, the client hello packet will be sent in two parts:
fragmentation for the first data packet and the rest 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. go to Settings > Extensions, and disable them.
### OSX ### OSX
Run `$ spoof-dpi` and it will automatically set your proxy Run `$ spoof-dpi` and it will automatically set your proxy
### Linux ### 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"` `google-chrome --proxy-server="http://127.0.0.1:8080"`
# How it works # 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. 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 ### HTTPS
Although TLS 1.3 encrypts every handshake process, the domain names are still shown as plaintext in the Client hello packet. 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. 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. 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. 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, What SpoofDPI does to bypass this is to send the first 1 byte of a request to the server,
and then send the rest. and then send the rest.
> SpoofDPI doesn't decrypt your HTTPS requests, and that's why we don't need the SSL certificates. > SpoofDPI doesn't decrypt your HTTPS requests, and that's why we don't need the SSL certificates.
# Inspirations # 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 [GoodbyeDPI](https://github.com/ValdikSS/GoodbyeDPI) by @ValdikSS

View File

@ -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) Можете прочитать на других языках: [🇬🇧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) ![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 || ...` Чтобы запустить SpoofDPI в любой директории, добавьте строку ниже в `~/.bashrc || ~/.zshrc || ...`
``` ```
export PATH=$PATH:~/.spoof-dpi/bin export PATH=$PATH:~/.spoof-dpi/bin
``` ```
--- ---
```bash ```bash
# OSX # macOS Intel
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s darwin-amd64 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 # linux-amd64
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s 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 ## Go
Вы также можете установить SpoofDPI с помощью **go install** Вы также можете установить SpoofDPI с помощью **go install**
`$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi` `$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi`
> Не забудьте, что $GOPATH должен быть установлен в Вашем $PATH > Не забудьте, что $GOPATH должен быть установлен в Вашем $PATH
## Git ## Git
Вы также можете собрать SpoofDPI Вы также можете собрать SpoofDPI
`$ git clone https://github.com/xvzc/SpoofDPI.git` `$ git clone https://github.com/xvzc/SpoofDPI.git`
`$ cd SpoofDPI` `$ cd SpoofDPI`
`$ go build ./cmd/...` `$ 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: when not given, the client hello packet will be sent in two parts:
fragmentation for the first data packet and the rest fragmentation for the first data packet and the rest
``` ```
> Если Вы используете любые VPN-расширения по типу Hotspot Shield в браузере > Если Вы используете любые VPN-расширения по типу Hotspot Shield в браузере
Chrome, зайдите в Настройки > Расширения и отключите их. Chrome, зайдите в Настройки > Расширения и отключите их.
### OSX ### OSX
@ -98,5 +101,5 @@ curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bas
> SpoofDPI не расшифровывает Ваши HTTPS запросы, так что нам не нужны SSL сертификаты. > 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 [GoodbyeDPI](https://github.com/ValdikSS/GoodbyeDPI) от @ValdikSS

View File

@ -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) 选择语言: [🇬🇧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) ![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 ```bash
# OSX # macOS Intel
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s darwin-amd64 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 # linux-amd64
curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s 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
也可以用 **go install** 安装 也可以用 **go install** 安装
`$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi` `$ go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi`
> 记得确认 $GOPATH 在你的 $PATH 中 > 记得确认 $GOPATH 在你的 $PATH 中
## Git ## Git
You can also build your own You can also build your own
`$ git clone https://github.com/xvzc/SpoofDPI.git` `$ git clone https://github.com/xvzc/SpoofDPI.git`
`$ cd SpoofDPI` `$ cd SpoofDPI`
`$ go build ./cmd/...` `$ go build ./cmd/...`
# 使用方法 # 使用方法
@ -88,7 +91,7 @@ Usage: spoof-dpi [options...]
运行 `$ spoof-dpi` ,然后它会自动设置自身为代理 运行 `$ spoof-dpi` ,然后它会自动设置自身为代理
### Linux ### Linux
运行 `$ spoof-dpi` 然后加上代理参数运行你的浏览器 运行 `$ spoof-dpi` 然后加上代理参数运行你的浏览器
`google-chrome --proxy-server="http://127.0.0.1:8080"` `google-chrome --proxy-server="http://127.0.0.1:8080"`
@ -100,10 +103,10 @@ Usage: spoof-dpi [options...]
### HTTPS ### HTTPS
尽管 TLS 1.3加密了握手的每一步,但是在 Client Hello 中的域名仍然是明文的。因此如果有人看到 Client Hello 包就可以知道你在连接什么网站。这给 DPI 提供了很大方便,我们也看到连接在 Client Hello 之后就会被屏蔽掉。我之前尝试了规避这种审查,并发现,如果把 Client Hello 分包,只有第一个 chunk 会被检测。SpoofDPI 只要在第一个分包发送 1 byte然后再发送其他部分就能规避。 尽管 TLS 1.3加密了握手的每一步,但是在 Client Hello 中的域名仍然是明文的。因此如果有人看到 Client Hello 包就可以知道你在连接什么网站。这给 DPI 提供了很大方便,我们也看到连接在 Client Hello 之后就会被屏蔽掉。我之前尝试了规避这种审查,并发现,如果把 Client Hello 分包,只有第一个 chunk 会被检测。SpoofDPI 只要在第一个分包发送 1 byte然后再发送其他部分就能规避。
> SpoofDPI 不会解密 HTTPS 请求,所以您无需安装任何 TLS 证书。 > 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 [GoodbyeDPI](https://github.com/ValdikSS/GoodbyeDPI) by @ValdikSS