mirror of
https://github.com/bol-van/zapret2.git
synced 2026-10-29 06:02:05 +00:00
blockcheck2: use cygstart in windows to avoid fork problems (without cygwin rebase)
This commit is contained in:
1 parent
1d85620abd
commit
b78b52c4cd
2 files changed
+19
-5
No files matched your search
+18
-4
@@ -942,22 +942,36 @@ pktws_ipt_unprepare_udp()
|
||||
|
||||
pktws_start()
|
||||
{
|
||||
local pidfile
|
||||
case "$UNAME" in
|
||||
Linux)
|
||||
"$NFQWS2" --uid $WS_UID:$WS_GID --fwmark=$DESYNC_MARK --qnum=$QNUM --lua-init=@"$ZAPRET_BASE/lua/zapret-lib.lua" --lua-init=@"$ZAPRET_BASE/lua/zapret-antidpi.lua" "$@" >/dev/null &
|
||||
PID=$!
|
||||
# give some time to initialize
|
||||
minsleep
|
||||
;;
|
||||
FreeBSD|OpenBSD)
|
||||
"$DVTWS2" --port=$IPFW_DIVERT_PORT --lua-init=@"$ZAPRET_BASE/lua/zapret-lib.lua" --lua-init=@"$ZAPRET_BASE/lua/zapret-antidpi.lua" "$@" >/dev/null &
|
||||
PID=$!
|
||||
# give some time to initialize
|
||||
minsleep
|
||||
;;
|
||||
CYGWIN)
|
||||
pidfile="/tmp/blockcheck_cygpid_$$"
|
||||
# avoid fork
|
||||
# allow multiple PKTWS instances with the same wf filter but different ipset
|
||||
# some methods require empty acks
|
||||
"$WINWS2" --wf-dup-check=0 --wf-tcp-empty=1 $WF --ipset="$IPSET_FILE" --lua-init=@"$ZAPRET_BASE/lua/zapret-lib.lua" --lua-init=@"$ZAPRET_BASE/lua/zapret-antidpi.lua" "$@" >/dev/null &
|
||||
cygstart --hide "$WINWS2" --pidfile="$pidfile" --wf-dup-check=0 --wf-tcp-empty=1 $WF --ipset="$IPSET_FILE" --lua-init=@"$ZAPRET_BASE/lua/zapret-lib.lua" --lua-init=@"$ZAPRET_BASE/lua/zapret-antidpi.lua" "$@" >/dev/null &
|
||||
# give some time to initialize
|
||||
minsleep
|
||||
if [ -f "$pidfile" ]; then
|
||||
read PID <"$pidfile"
|
||||
rm -f "$pidfile"
|
||||
else
|
||||
echo "pktws failed to initialize within specified time !!"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
PID=$!
|
||||
# give some time to initialize
|
||||
minsleep
|
||||
}
|
||||
ws_kill()
|
||||
{
|
||||
|
||||
+1
-1
@@ -313,4 +313,4 @@ v0.9.4.3
|
||||
* nfqws2: accept string or function in timer_set(). remember function as a function, not as a string.
|
||||
* nfqws2: limit delayed packet queue to 64 packets (anti-ddos)
|
||||
* init.d: add udp ports range 19294-19344 to discord media
|
||||
|
||||
* blockcheck2: use cygstart in windows to avoid fork problems (without cygwin rebase)
|
||||
Reference in new issue
Block a user