mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 12:10:53 +03:00
Compare commits
3 Commits
f5f210b30c
...
e8241a4fa3
Author | SHA1 | Date | |
---|---|---|---|
|
e8241a4fa3 | ||
|
e432d46e15 | ||
|
b3a33731ec |
Binary file not shown.
Binary file not shown.
@ -1,2 +1,3 @@
|
|||||||
start "zapret: http,https" "%~dp0winws.exe" --wf-tcp=80,443 --dpi-desync=fake,disorder2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig
|
start "zapret: http,https" "%~dp0winws.exe" --wf-tcp=80,443 --dpi-desync=fake,disorder2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig
|
||||||
|
timeout /t 1
|
||||||
start "zapret: quic" "%~dp0winws.exe" --wf-udp=443 --dpi-desync=fake --dpi-desync-repeats=11
|
start "zapret: quic" "%~dp0winws.exe" --wf-udp=443 --dpi-desync=fake --dpi-desync-repeats=11
|
@ -1,2 +1,3 @@
|
|||||||
start "zapret: http,https,autohostlist" "%~dp0winws.exe" --wf-tcp=80,443 --dpi-desync=fake,disorder2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --hostlist-auto="%~dp0autohostlist.txt"
|
start "zapret: http,https,autohostlist" "%~dp0winws.exe" --wf-tcp=80,443 --dpi-desync=fake,disorder2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --hostlist-auto="%~dp0autohostlist.txt"
|
||||||
|
timeout /t 1
|
||||||
start "zapret: quic,autohostlist" "%~dp0winws.exe" --wf-udp=443 --dpi-desync=fake --dpi-desync-repeats=10 --hostlist-auto="%~dp0autohostlist.txt"
|
start "zapret: quic,autohostlist" "%~dp0winws.exe" --wf-udp=443 --dpi-desync=fake --dpi-desync-repeats=10 --hostlist-auto="%~dp0autohostlist.txt"
|
Binary file not shown.
@ -957,7 +957,9 @@ void tcp_rewrite_winsize(struct tcphdr *tcp, uint16_t winsize, uint8_t scale_fac
|
|||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
|
|
||||||
static HANDLE w_filter = NULL, w_event = NULL;
|
static HANDLE w_filter = NULL;
|
||||||
|
static OVERLAPPED ovl = { .hEvent = NULL };
|
||||||
|
;
|
||||||
|
|
||||||
static HANDLE windivert_init_filter(const char *filter, UINT64 flags)
|
static HANDLE windivert_init_filter(const char *filter, UINT64 flags)
|
||||||
{
|
{
|
||||||
@ -983,13 +985,14 @@ void rawsend_cleanup(void)
|
|||||||
{
|
{
|
||||||
if (w_filter)
|
if (w_filter)
|
||||||
{
|
{
|
||||||
|
CancelIoEx(w_filter,&ovl);
|
||||||
WinDivertClose(w_filter);
|
WinDivertClose(w_filter);
|
||||||
w_filter=NULL;
|
w_filter=NULL;
|
||||||
}
|
}
|
||||||
if (w_event)
|
if (ovl.hEvent)
|
||||||
{
|
{
|
||||||
CloseHandle(w_event);
|
CloseHandle(ovl.hEvent);
|
||||||
w_event=NULL;
|
ovl.hEvent=NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool windivert_init(const char *filter)
|
bool windivert_init(const char *filter)
|
||||||
@ -998,8 +1001,8 @@ bool windivert_init(const char *filter)
|
|||||||
w_filter = windivert_init_filter(filter, 0);
|
w_filter = windivert_init_filter(filter, 0);
|
||||||
if (w_filter)
|
if (w_filter)
|
||||||
{
|
{
|
||||||
w_event = CreateEventW(NULL,FALSE,FALSE,NULL);
|
ovl.hEvent = CreateEventW(NULL,FALSE,FALSE,NULL);
|
||||||
if (!w_event)
|
if (!ovl.hEvent)
|
||||||
{
|
{
|
||||||
rawsend_cleanup();
|
rawsend_cleanup();
|
||||||
return false;
|
return false;
|
||||||
@ -1013,7 +1016,6 @@ static bool windivert_recv_filter(HANDLE hFilter, uint8_t *packet, size_t *len,
|
|||||||
{
|
{
|
||||||
UINT recv_len;
|
UINT recv_len;
|
||||||
DWORD err;
|
DWORD err;
|
||||||
OVERLAPPED ovl = { .hEvent = w_event };
|
|
||||||
DWORD rd;
|
DWORD rd;
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
@ -1034,7 +1036,7 @@ static bool windivert_recv_filter(HANDLE hFilter, uint8_t *packet, size_t *len,
|
|||||||
{
|
{
|
||||||
case ERROR_IO_PENDING:
|
case ERROR_IO_PENDING:
|
||||||
// make signals working
|
// make signals working
|
||||||
while (WaitForSingleObject(w_event,50)==WAIT_TIMEOUT)
|
while (WaitForSingleObject(ovl.hEvent,50)==WAIT_TIMEOUT)
|
||||||
{
|
{
|
||||||
if (bQuit)
|
if (bQuit)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user