mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-11 17:29:16 +05:00
nfqws: autohostlist reset fail counter if website accessible
This commit is contained in:
parent
0d0fe6060e
commit
a01505ca37
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.
Binary file not shown.
0
binaries/win64/zapret-winws/autohostlist.txt
Normal file
0
binaries/win64/zapret-winws/autohostlist.txt
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1096,7 +1096,7 @@ bool nlm_list(bool bAll)
|
||||
IEnumNetworkConnections *pEnumConnections;
|
||||
VARIANT_BOOL bIsConnected, bIsConnectedInet;
|
||||
NLM_NETWORK_CATEGORY category;
|
||||
GUID idNet, idAdapter;
|
||||
GUID idNet, idAdapter, idConn;
|
||||
BSTR bstrName;
|
||||
char Name[128],Name2[128];
|
||||
int connected;
|
||||
|
20
nfq/desync.c
20
nfq/desync.c
@ -174,6 +174,22 @@ static void ctrack_stop_retrans_counter(t_ctrack *ctrack)
|
||||
}
|
||||
}
|
||||
|
||||
static void auto_hostlist_reset_fail_counter(const char *hostname)
|
||||
{
|
||||
if (hostname)
|
||||
{
|
||||
hostfail_pool *fail_counter;
|
||||
|
||||
fail_counter = HostFailPoolFind(params.hostlist_auto_fail_counters, hostname);
|
||||
if (fail_counter)
|
||||
{
|
||||
HostFailPoolDel(¶ms.hostlist_auto_fail_counters, fail_counter);
|
||||
DLOG("auto hostlist : %s : fail counter reset. website is working.\n", hostname);
|
||||
HOSTLIST_DEBUGLOG_APPEND("%s : fail counter reset. website is working.", hostname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// return true if retrans trigger fires
|
||||
static bool auto_hostlist_retrans(t_ctrack *ctrack, uint8_t l4proto, int threshold)
|
||||
{
|
||||
@ -187,6 +203,7 @@ static bool auto_hostlist_retrans(t_ctrack *ctrack, uint8_t l4proto, int thresho
|
||||
{
|
||||
DLOG("req retrans : tcp seq %u not within the req range %u-%u. stop tracking.\n", ctrack->seq_last, ctrack->req_seq_start, ctrack->req_seq_end);
|
||||
ctrack_stop_retrans_counter(ctrack);
|
||||
auto_hostlist_reset_fail_counter(ctrack->hostname);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -540,7 +557,10 @@ static uint8_t dpi_desync_tcp_packet_play(bool replay, size_t reasm_offset, uint
|
||||
HOSTLIST_DEBUGLOG_APPEND("%s : redirect to another domain", ctrack->hostname);
|
||||
}
|
||||
else
|
||||
{
|
||||
DLOG("local or in-domain redirect detected. it's not a DPI redirect.\n")
|
||||
auto_hostlist_reset_fail_counter(ctrack->hostname);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user