nfqws,tpws: multiple hostlist support, exclude hostlist support

This commit is contained in:
bol-van
2022-07-26 19:15:28 +03:00
parent 6fc58fac87
commit 403dc1a204
34 changed files with 346 additions and 135 deletions

View File

@@ -323,7 +323,7 @@ packet_process_result dpi_desync_tcp_packet(uint32_t fwmark, const char *ifout,
if (bHaveHost)
{
DLOG("hostname: %s\n",host)
if (params.hostlist && !SearchHostList(params.hostlist,host,params.debug))
if ((params.hostlist || params.hostlist_exclude) && !HostlistCheck(params.hostlist, params.hostlist_exclude, host))
{
DLOG("not applying tampering to this request\n")
return res;
@@ -738,7 +738,7 @@ packet_process_result dpi_desync_udp_packet(uint32_t fwmark, const char *ifout,
if (bHaveHost)
{
DLOG("hostname: %s\n",host)
if (params.hostlist && !SearchHostList(params.hostlist,host,params.debug))
if ((params.hostlist || params.hostlist_exclude) && !HostlistCheck(params.hostlist, params.hostlist_exclude, host))
{
DLOG("not applying tampering to this request\n")
return res;