1
0
mirror of https://github.com/bol-van/zapret.git synced 2025-04-17 20:42:57 +03:00

nfqws: require qnum or port

This commit is contained in:
bol-van 2024-04-17 09:29:10 +03:00
parent 1e56ad498e
commit 17c64b8690
10 changed files with 18 additions and 8 deletions
binaries
aarch64
arm
freebsd-x64
mips32r1-lsb
mips32r1-msb
mips64r2-msb
ppc
x86
x86_64
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.

Binary file not shown.

Binary file not shown.

@ -688,6 +688,9 @@ int main(int argc, char **argv)
memcpy(params.hostspell, "host", 4); // default hostspell
*pidfile = 0;
#ifdef __linux__
params.qnum = -1;
#endif
params.desync_fwmark = DPI_DESYNC_FWMARK_DEFAULT;
params.desync_skip_nosni = true;
params.desync_split_pos = 2;
@ -1230,6 +1233,21 @@ int main(int argc, char **argv)
#endif
}
}
#ifdef __linux__
if (params.qnum<0)
{
fprintf(stderr, "Need queue number (--qnum)\n");
exit_clean(1);
}
#elif defined(BSD)
if (!params.port)
{
fprintf(stderr, "Need divert port (--port)\n");
exit_clean(1);
}
#endif
// not specified - use desync_ttl value instead
if (params.desync_ttl6 == 0xFF) params.desync_ttl6=params.desync_ttl;
if (!AUTOTTL_ENABLED(params.desync_autottl6)) params.desync_autottl6 = params.desync_autottl;
@ -1238,14 +1256,6 @@ int main(int argc, char **argv)
if (AUTOTTL_ENABLED(params.desync_autottl6))
DLOG("autottl ipv6 %u:%u-%u\n",params.desync_autottl6.delta,params.desync_autottl6.min,params.desync_autottl6.max)
#ifdef BSD
if (!params.port)
{
fprintf(stderr, "Need port number\n");
exit_clean(1);
}
#endif
if (!LoadIncludeHostLists())
{
fprintf(stderr, "Include hostlist load failed\n");