diff --git a/init.d/openwrt/functions b/init.d/openwrt/functions index c6c6fad..dfde538 100644 --- a/init.d/openwrt/functions +++ b/init.d/openwrt/functions @@ -5,7 +5,7 @@ [ -n "$QNUM" ] || QNUM=200 [ -n "$TPPORT" ] || TPPORT=988 -TPWS_USER=daemon +[ -n "$WS_USER" ] || WS_USER=daemon TPWS_LOCALHOST4=127.0.0.127 [ -n "$DESYNC_MARK" ] || DESYNC_MARK=0x40000000 [ -n "$OPENWRT_LAN" ] || OPENWRT_LAN=lan @@ -224,7 +224,7 @@ fw_nfqws_post() } -IPT_OWNER="-m owner ! --uid-owner $TPWS_USER" +IPT_OWNER="-m owner ! --uid-owner $WS_USER" fw_tpws4() { # $1 - filter ipv6 diff --git a/init.d/openwrt/zapret b/init.d/openwrt/zapret index f00db54..fd685c8 100755 --- a/init.d/openwrt/zapret +++ b/init.d/openwrt/zapret @@ -19,16 +19,15 @@ fi PIDDIR=/var/run -NFQWS_USER=daemon [ -n "$NFQWS" ] || NFQWS="$ZAPRET_BASE/nfq/nfqws" -NFQWS_OPT_BASE="--user=$NFQWS_USER --dpi-desync-fwmark=$DESYNC_MARK" +NFQWS_OPT_BASE="--user=$WS_USER --dpi-desync-fwmark=$DESYNC_MARK" [ -n "$TPWS" ] || TPWS="$ZAPRET_BASE/tpws/tpws" TPWS_LOCALHOST4=127.0.0.127 HOSTLIST="$ZAPRET_BASE/ipset/zapret-hosts.txt.gz" [ -f "$HOSTLIST" ] || HOSTLIST="$ZAPRET_BASE/ipset/zapret-hosts.txt" [ -f "$HOSTLIST" ] || HOSTLIST="$ZAPRET_BASE/ipset/zapret-hosts-user.txt" -TPWS_OPT_BASE="--user=$TPWS_USER" +TPWS_OPT_BASE="--user=$WS_USER" TPWS_OPT_BASE4="--bind-addr=$TPWS_LOCALHOST4" TPWS_OPT_BASE6="--bind-addr=::1" TPWS_WAIT="--bind-wait-ifup=30 --bind-wait-ip=30"