Browse Source

init.d: openwrt WS_USER

pull/81/head
bol-van 4 years ago
parent
commit
dfd9966161
  1. 4
      init.d/openwrt/functions
  2. 5
      init.d/openwrt/zapret

4
init.d/openwrt/functions

@ -5,7 +5,7 @@
[ -n "$QNUM" ] || QNUM=200 [ -n "$QNUM" ] || QNUM=200
[ -n "$TPPORT" ] || TPPORT=988 [ -n "$TPPORT" ] || TPPORT=988
TPWS_USER=daemon [ -n "$WS_USER" ] || WS_USER=daemon
TPWS_LOCALHOST4=127.0.0.127 TPWS_LOCALHOST4=127.0.0.127
[ -n "$DESYNC_MARK" ] || DESYNC_MARK=0x40000000 [ -n "$DESYNC_MARK" ] || DESYNC_MARK=0x40000000
[ -n "$OPENWRT_LAN" ] || OPENWRT_LAN=lan [ -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() fw_tpws4()
{ {
# $1 - filter ipv6 # $1 - filter ipv6

5
init.d/openwrt/zapret

@ -19,16 +19,15 @@ fi
PIDDIR=/var/run PIDDIR=/var/run
NFQWS_USER=daemon
[ -n "$NFQWS" ] || NFQWS="$ZAPRET_BASE/nfq/nfqws" [ -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" [ -n "$TPWS" ] || TPWS="$ZAPRET_BASE/tpws/tpws"
TPWS_LOCALHOST4=127.0.0.127 TPWS_LOCALHOST4=127.0.0.127
HOSTLIST="$ZAPRET_BASE/ipset/zapret-hosts.txt.gz" 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.txt"
[ -f "$HOSTLIST" ] || HOSTLIST="$ZAPRET_BASE/ipset/zapret-hosts-user.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_BASE4="--bind-addr=$TPWS_LOCALHOST4"
TPWS_OPT_BASE6="--bind-addr=::1" TPWS_OPT_BASE6="--bind-addr=::1"
TPWS_WAIT="--bind-wait-ifup=30 --bind-wait-ip=30" TPWS_WAIT="--bind-wait-ifup=30 --bind-wait-ip=30"

Loading…
Cancel
Save