mirror of
https://github.com/bol-van/zapret.git
synced 2025-05-05 05:12:58 +03:00
Compare commits
10 Commits
f7ff11ecda
...
1fc98fa135
Author | SHA1 | Date | |
---|---|---|---|
|
1fc98fa135 | ||
|
5c44ab5e8a | ||
|
764c79711b | ||
|
1971a80a9f | ||
|
60b27ce0b2 | ||
|
8480cd9202 | ||
|
c2aedddf76 | ||
|
9f182c02d1 | ||
|
fc0b8266e3 | ||
|
0910e943eb |
binaries
aarch64
arm
freebsd-x64
mips32r1-lsb
mips32r1-msb
mips64r2-msb
ppc
win64
x86
x86_64
docs
nfq
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
binaries/win64/windivert32.lib
Normal file
0
binaries/win64/windivert32.lib
Normal file
Binary file not shown.
BIN
binaries/win64/zapret-winws/cygiconv-2.dll
Normal file
BIN
binaries/win64/zapret-winws/cygiconv-2.dll
Normal file
Binary file not shown.
BIN
binaries/win64/zapret-winws/cygintl-8.dll
Normal file
BIN
binaries/win64/zapret-winws/cygintl-8.dll
Normal file
Binary file not shown.
BIN
binaries/win64/zapret-winws/killall.exe
Normal file
BIN
binaries/win64/zapret-winws/killall.exe
Normal file
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
start "zapret: http,https,quic" /min "%~dp0winws.exe" ^
|
||||
--wf-tcp=80,443 --wf-udp=443,50000-50099 --debug ^
|
||||
--wf-tcp=80,443 --wf-udp=443,50000-50099 ^
|
||||
--filter-udp=50000-50099 --ipset="%~dp0ipset-discord.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-any-protocol --dpi-desync-cutoff=n2 --new ^
|
||||
--filter-udp=50000-50099 --new ^
|
||||
--filter-udp=443 --hostlist="%~dp0list-youtube.txt" --dpi-desync=fake --dpi-desync-repeats=11 --dpi-desync-fake-quic="%~dp0quic_initial_www_google_com.bin" --new ^
|
||||
|
@ -1,5 +1,7 @@
|
||||
start "zapret: http,https,quic" /min "%~dp0winws.exe" ^
|
||||
--wf-tcp=80,443 --wf-udp=443 ^
|
||||
--wf-tcp=80,443 --wf-udp=443,50000-50099 ^
|
||||
--filter-udp=50000-50099 --ipset="%~dp0ipset-discord.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-any-protocol --dpi-desync-cutoff=n2 --new ^
|
||||
--filter-udp=50000-50099 --new ^
|
||||
--filter-udp=443 --hostlist="%~dp0list-youtube.txt" --dpi-desync=fake --dpi-desync-repeats=11 --dpi-desync-fake-quic="%~dp0quic_initial_www_google_com.bin" --new ^
|
||||
--filter-udp=443 --dpi-desync=fake --dpi-desync-repeats=11 --new ^
|
||||
--filter-tcp=80 --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --hostlist-auto="%~dp0autohostlist.txt" --new ^
|
||||
|
1
binaries/win64/zapret-winws/reload_lists.cmd
Normal file
1
binaries/win64/zapret-winws/reload_lists.cmd
Normal file
@ -0,0 +1 @@
|
||||
%~dp0killall -HUP winws
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -281,8 +281,8 @@ nfqws
|
||||
--filter-tcp=[~]port1[-port2] ; фильтр портов tcp для текущей стратегии. ~ означает инверсию. установка фильтра tcp и неустановка фильтра udp запрещает udp.
|
||||
--filter-udp=[~]port1[-port2] ; фильтр портов udp для текущей стратегии. ~ означает инверсию. установка фильтра udp и неустановка фильтра tcp запрещает udp.
|
||||
--filter-l7=[http|tls|quic|wireguard|dht|unknown] ; фильтр протокола L6-L7. поддерживается несколько значений через запятую.
|
||||
--ipset=<filename> ; включающий ip list. на каждой строчке ip или cidr. поддерживается множество листов и gzip.
|
||||
--ipset-exclude=<filename> ; исключающий ip list. на каждой строчке ip или cidr. поддерживается множество листов и gzip.
|
||||
--ipset=<filename> ; включающий ip list. на каждой строчке ip или cidr ipv4 или ipv6. поддерживается множество листов и gzip.
|
||||
--ipset-exclude=<filename> ; исключающий ip list. на каждой строчке ip или cidr ipv4 или ipv6. поддерживается множество листов и gzip.
|
||||
|
||||
Параметры манипуляции могут сочетаться в любых комбинациях.
|
||||
|
||||
@ -787,8 +787,8 @@ tpws - это transparent proxy.
|
||||
--filter-l3=ipv4|ipv6 ; фильтр версии ip для текущей стратегии
|
||||
--filter-tcp=[~]port1[-port2] ; фильтр портов tcp для текущей стратегии. ~ означает инверсию.
|
||||
--filter-l7=[http|tls|quic|wireguard|dht|unknown] ; фильтр протокола L6-L7. поддерживается несколько значений через запятую.
|
||||
--ipset=<filename> ; включающий ip list. на каждой строчке ip или cidr. поддерживается множество листов и gzip.
|
||||
--ipset-exclude=<filename> ; исключающий ip list. на каждой строчке ip или cidr. поддерживается множество листов и gzip.
|
||||
--ipset=<filename> ; включающий ip list. на каждой строчке ip или cidr ipv4 или ipv6. поддерживается множество листов и gzip.
|
||||
--ipset-exclude=<filename> ; исключающий ip list. на каждой строчке ip или cidr ipv4 или ipv6. поддерживается множество листов и gzip.
|
||||
|
||||
|
||||
--debug позволяет выводить подробный лог действий на консоль, в syslog или в файл.
|
||||
|
@ -80,11 +80,13 @@ curl -O https://www.cygwin.com/setup-x86_64.exe
|
||||
setup-x86_64.exe --allow-unsupported-windows --no-verify --site http://ctm.crouchingtigerhiddenfruitbat.org/pub/cygwin/circa/64bit/2024/01/30/231215
|
||||
```
|
||||
You must choose to install `curl`. To compile from sources install `gcc-core`,`make`,`zlib-devel`.
|
||||
Make from directory `nfq` using `make cygwin`.
|
||||
|
||||
`winws` requires `cygwin1.dll`, `windivert.dll`, `windivert64.sys`. You can take them from `binaries/win64/zapret-winws`.
|
||||
|
||||
It's possible to build x86 32-bit version but this version is not shipped. You have to build it yourself.
|
||||
32-bit `windivert` can be downloaded from it's developer github. Required version is 2.2.2.
|
||||
32-bit x86 version can be build from 32-bit cygwin using `make cygwin32`.
|
||||
`windivert.dll` and `windivert32.sys` can be taken from [windivert 2.2.2 archive](https://reqrypt.org/download)
|
||||
|
||||
There's no `arm64` signed `windivert` driver and no `cygwin`.
|
||||
But it's possible to use unsigned driver version in test mode and user mode components with x64 emulation.
|
||||
x64 emulation requires `windows 11` and not supported in `windows 10`.
|
||||
@ -159,3 +161,5 @@ unix2dos winws.log
|
||||
```
|
||||
|
||||
`winws.log` will be in `cygwin/home/<username>`. `unix2dos` helps with `windows 7` notepad. It's not necessary in `Windows 10` and later.
|
||||
|
||||
Pre-compiled 32-bit binaries can be downloaded [here](https://github.com/bol-van/zapret-win32)
|
||||
|
@ -120,8 +120,9 @@ setup-x86_64.exe --allow-unsupported-windows --no-verify --site http://ctm.crouc
|
||||
Для сборки из исходников требуется gcc-core,make,zlib-devel.
|
||||
Собирать из директории nfq командой "make cygwin".
|
||||
winws требует cygwin1.dll, windivert.dll, windivert64.sys. Их можно взять из binaries/win64/zapret-winws.
|
||||
Версию для 32-битных x86 windows собрать можно, но такие системы уже уходят в прошлое, поэтому если надо - собирайте сами.
|
||||
32-битный windivert можно взять с сайта разработчика. Требуется версия 2.2.2.
|
||||
|
||||
32-битную x86 версию можно собрать из 32-битного cygwin командой "make cygwin32".
|
||||
windivert.dll и windivert32.sys можно взять из комплекта windivert 2.2.2 : https://reqrypt.org/download
|
||||
|
||||
Для arm64 windows нет подписанного драйвера windivert и нет cygwin.
|
||||
Однако, эмуляция x64 windows 11 позволяет использовать все, кроме WinDivert64.sys без изменений.
|
||||
@ -220,3 +221,6 @@ winws --debug --wf-tcp=80,443 | tee winws.log
|
||||
winws.log будет в cygwin/home/<имя_пользователя>
|
||||
Если у вас windows 7, то блокнот не поймет переводы строк в стиле unix. Воспользуйтесь командой
|
||||
unix2dos winws.log
|
||||
|
||||
Готовую 32-битную версию можно скачать здесь : https://github.com/bol-van/zapret-win32
|
||||
Поскольку 32-битные windows мало востребованы, выложены только бинарники и ничего больше.
|
||||
|
13
nfq/Makefile
13
nfq/Makefile
@ -5,7 +5,11 @@ CFLAGS_MAC = -mmacosx-version-min=10.8
|
||||
CFLAGS_CYGWIN = -Wno-address-of-packed-member -static
|
||||
LIBS_LINUX = -lnetfilter_queue -lnfnetlink -lz
|
||||
LIBS_BSD = -lz
|
||||
LIBS_CYGWIN = -lz -Lwindows/windivert -Iwindows -lwindivert -lwlanapi -lole32 -loleaut32 -luuid
|
||||
LIBS_CYGWIN = -lz -Lwindows/windivert -Iwindows -lwlanapi -lole32 -loleaut32 -luuid
|
||||
LIBS_CYGWIN32 = -lwindivert32
|
||||
LIBS_CYGWIN64 = -lwindivert64
|
||||
RES_CYGWIN32 = windows/res/32/winmanifest.o windows/res/32/winicon.o
|
||||
RES_CYGWIN64 = windows/res/64/winmanifest.o windows/res/64/winicon.o
|
||||
SRC_FILES = *.c crypto/*.c
|
||||
|
||||
all: nfqws
|
||||
@ -23,8 +27,11 @@ mac: $(SRC_FILES)
|
||||
lipo -create -output dvtws dvtwsx dvtwsa
|
||||
rm -f dvtwsx dvtwsa
|
||||
|
||||
cygwin:
|
||||
$(CC) -s $(CFLAGS) $(CFLAGS_CYGWIN) -o winws $(SRC_FILES) $(LDFLAGS) $(LIBS_CYGWIN) windows/res/winmanifest.o windows/res/winicon.o
|
||||
cygwin64:
|
||||
$(CC) -s $(CFLAGS) $(CFLAGS_CYGWIN) -o winws $(SRC_FILES) $(LDFLAGS) $(LIBS_CYGWIN) $(LIBS_CYGWIN64) $(RES_CYGWIN64)
|
||||
cygwin32:
|
||||
$(CC) -s $(CFLAGS) $(CFLAGS_CYGWIN) -o winws $(SRC_FILES) $(LDFLAGS) $(LIBS_CYGWIN) $(LIBS_CYGWIN32) $(RES_CYGWIN32)
|
||||
cygwin: cygwin64
|
||||
|
||||
clean:
|
||||
rm -f nfqws dvtws winws.exe
|
||||
|
@ -22,6 +22,11 @@
|
||||
#ifdef __CYGWIN__
|
||||
#include <wlanapi.h>
|
||||
#include <netlistmgr.h>
|
||||
|
||||
#ifndef ERROR_INVALID_IMAGE_HASH
|
||||
#define ERROR_INVALID_IMAGE_HASH __MSABI_LONG(577)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
uint32_t net32_add(uint32_t netorder_value, uint32_t cpuorder_increment)
|
||||
|
@ -392,7 +392,7 @@ static void process_retrans_fail(t_ctrack *ctrack, uint8_t proto, const struct s
|
||||
*client_ip_port=0;
|
||||
if (ctrack && ctrack->dp && ctrack->hostname && auto_hostlist_retrans(ctrack, proto, ctrack->dp->hostlist_auto_retrans_threshold, client_ip_port, ctrack->l7proto))
|
||||
{
|
||||
HOSTLIST_DEBUGLOG_APPEND("%s : profile %d : client %s : proto %s : tcp retrans threshold reached", ctrack->hostname, ctrack->dp->n, client_ip_port, l7proto_str(ctrack->l7proto));
|
||||
HOSTLIST_DEBUGLOG_APPEND("%s : profile %d : client %s : proto %s : retrans threshold reached", ctrack->hostname, ctrack->dp->n, client_ip_port, l7proto_str(ctrack->l7proto));
|
||||
auto_hostlist_failed(ctrack->dp, ctrack->hostname, client_ip_port, ctrack->l7proto);
|
||||
}
|
||||
}
|
||||
@ -1774,10 +1774,8 @@ static uint8_t dpi_desync_udp_packet_play(bool replay, size_t reasm_offset, uint
|
||||
if (ctrack_replay->hostname_ah_check)
|
||||
{
|
||||
// first request is not retrans
|
||||
if (ctrack_replay->hostname)
|
||||
if (!bDiscoveredHostname)
|
||||
process_retrans_fail(ctrack_replay, IPPROTO_UDP, (struct sockaddr*)&src);
|
||||
else
|
||||
ctrack_replay->hostname=strdup(host);
|
||||
}
|
||||
}
|
||||
DLOG("not applying tampering to this request\n");
|
||||
|
BIN
nfq/windows/res/32/winicon.o
Normal file
BIN
nfq/windows/res/32/winicon.o
Normal file
Binary file not shown.
BIN
nfq/windows/res/32/winmanifest.o
Normal file
BIN
nfq/windows/res/32/winmanifest.o
Normal file
Binary file not shown.
BIN
nfq/windows/windivert/libwindivert32.a
Normal file
BIN
nfq/windows/windivert/libwindivert32.a
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user