preserve legacy fragmentation

This commit is contained in:
xvzc 2024-07-27 11:00:53 +09:00
parent 23f160d37b
commit 929af2973d
7 changed files with 58 additions and 34 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ spoof-dpi-*
spoof-dpi.*
!*/spoof-dpi/
.DS_Store
out/**

6
build
View File

@ -2,7 +2,7 @@
docker run --rm \
-it \
--workdir /app/ \
-v $(pwd):/app \
--workdir /app/out \
-v ./:/app \
golang:1.21-alpine \
sh make-releases.sh
sh /app/make-releases.sh

View File

@ -110,6 +110,8 @@ func (pxy *Proxy) splitInChunks(bytes []byte, size int) [][]byte {
return chunks
}
// When the given window-size <= 0
if len(raw) < 1 {
return [][]byte{raw}
}

View File

@ -51,25 +51,31 @@ You can also build your own
```
Usage: spoof-dpi [options...]
-addr string
Listen addr (default "127.0.0.1")
listen address (default "127.0.0.1")
-debug
Enable debug output
enable debug output
-dns-addr string
DNS addr (default "8.8.8.8")
dns address (default "8.8.8.8")
-dns-port int
DNS port (default 53)
port number for dns (default 53)
-enable-doh
Enable DOH
enable 'dns over https'
-no-banner
Disable banner
disable banner
-pattern string
Bypass DPI only on packets matching this regex pattern
bypass DPI only on packets matching this regex pattern
-port int
port (default 8080)
-timeout int
timeout in milliseconds (default 2000)
-url value
Bypass DPI only on this url, can be passed multiple times
-v print spoof-dpi's version. this may contain some other relevant information
-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;
set to 0 to use old (pre v0.10.0) client hello splitting method:
fragmentation for the first data packet and the rest (default 50)
```
> If you are using any vpn extensions such as Hotspot Shield in Chrome browser,

View File

@ -51,26 +51,31 @@ wget -O - https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash
```
Usage: spoof-dpi [options...]
-addr string
Listen addr (default "127.0.0.1")
listen address (default "127.0.0.1")
-debug
Enable debug output
enable debug output
-dns-addr string
DNS addr (default "8.8.8.8")
dns address (default "8.8.8.8")
-dns-port int
DNS port (default 53)
port number for dns (default 53)
-enable-doh
Enable DOH
enable 'dns over https'
-no-banner
Disable banner
disable banner
-pattern string
Bypass DPI only on packets matching this regex pattern
bypass DPI only on packets matching this regex pattern
-port int
port (default 8080)
-timeout int
timeout in milliseconds (default 2000)
-url value
Bypass DPI only on this url, can be passed multiple times
-v print spoof-dpi's version. this may contain some other relevant information
-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;
set to 0 to use old (pre v0.10.0) client hello splitting method:
fragmentation for the first data packet and the rest (default 50)
```
> 만약 브라우저에서 Hotspot Shield와 같은 크롬 VPN 확장프로그램을 사용중이라면
Settings > Extension 으로 이동해 비활성화 해주시기바랍니다.

View File

@ -52,26 +52,31 @@ wget -O - https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash
```
Usage: spoof-dpi [options...]
-addr string
Listen addr (default "127.0.0.1")
listen address (default "127.0.0.1")
-debug
Enable debug output
enable debug output
-dns-addr string
DNS addr (default "8.8.8.8")
dns address (default "8.8.8.8")
-dns-port int
DNS port (default 53)
port number for dns (default 53)
-enable-doh
Enable DOH
enable 'dns over https'
-no-banner
Disable banner
disable banner
-pattern string
Bypass DPI only on packets matching this regex pattern
bypass DPI only on packets matching this regex pattern
-port int
port (default 8080)
-timeout int
timeout in milliseconds (default 2000)
-url value
Bypass DPI only on this url, can be passed multiple times
-v print spoof-dpi's version. this may contain some other relevant information
-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;
set to 0 to use old (pre v0.10.0) client hello splitting method:
fragmentation for the first data packet and the rest (default 50)
```
**Перевод:**
```

View File

@ -58,26 +58,31 @@ You can also build your own
```
Usage: spoof-dpi [options...]
-addr string
Listen addr (default "127.0.0.1")
listen address (default "127.0.0.1")
-debug
Enable debug output
enable debug output
-dns-addr string
DNS addr (default "8.8.8.8")
dns address (default "8.8.8.8")
-dns-port int
DNS port (default 53)
port number for dns (default 53)
-enable-doh
Enable DOH
enable 'dns over https'
-no-banner
Disable banner
disable banner
-pattern string
Bypass DPI only on packets matching this regex pattern
bypass DPI only on packets matching this regex pattern
-port int
port (default 8080)
-timeout int
timeout in milliseconds (default 2000)
-url value
Bypass DPI only on this url, can be passed multiple times
-v print spoof-dpi's version. this may contain some other relevant information
-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;
set to 0 to use old (pre v0.10.0) client hello splitting method:
fragmentation for the first data packet and the rest (default 50)
```
> 如果你在 Chrome 浏览器使用其他 VPN 扩展比如 Hotspot Shield 请去 设置 > 扩展程序禁用它们