2021-03-04 14:30:38 +03:00
|
|
|
# this file is included from init scripts
|
|
|
|
# change values here
|
|
|
|
|
|
|
|
# can help in case /tmp has not enough space
|
|
|
|
#TMPDIR=/opt/zapret/tmp
|
|
|
|
|
2024-03-26 14:09:28 +03:00
|
|
|
# redefine user for zapret daemons. required on Keenetic
|
|
|
|
#WS_USER=nobody
|
|
|
|
|
2022-02-15 17:15:36 +03:00
|
|
|
# override firewall type : iptables,nftables,ipfw
|
|
|
|
#FWTYPE=iptables
|
|
|
|
|
2021-03-04 14:30:38 +03:00
|
|
|
# options for ipsets
|
2022-02-15 17:15:36 +03:00
|
|
|
# maximum number of elements in sets. also used for nft sets
|
2022-03-17 09:55:31 +03:00
|
|
|
SET_MAXELEM=522288
|
2021-03-04 14:30:38 +03:00
|
|
|
# too low hashsize can cause memory allocation errors on low RAM systems , even if RAM is enough
|
|
|
|
# too large hashsize will waste lots of RAM
|
2022-02-15 17:15:36 +03:00
|
|
|
IPSET_OPT="hashsize 262144 maxelem $SET_MAXELEM"
|
2022-03-17 13:26:06 +03:00
|
|
|
# dynamically generate additional ip. $1 = ipset/nfset/table name
|
|
|
|
#IPSET_HOOK="/etc/zapret.ipset.hook"
|
2021-03-04 14:30:38 +03:00
|
|
|
|
|
|
|
# options for ip2net. "-4" or "-6" auto added by ipset create script
|
|
|
|
IP2NET_OPT4="--prefix-length=22-30 --v4-threshold=3/4"
|
|
|
|
IP2NET_OPT6="--prefix-length=56-64 --v6-threshold=5"
|
2023-10-26 15:13:46 +03:00
|
|
|
# options for auto hostlist
|
|
|
|
AUTOHOSTLIST_RETRANS_THRESHOLD=3
|
2023-11-21 16:14:02 +03:00
|
|
|
AUTOHOSTLIST_FAIL_THRESHOLD=3
|
2023-10-26 15:13:46 +03:00
|
|
|
AUTOHOSTLIST_FAIL_TIME=60
|
2023-11-09 12:08:09 +03:00
|
|
|
# 1 = debug autohostlist positives to ipset/zapret-hosts-auto-debug.log
|
|
|
|
AUTOHOSTLIST_DEBUGLOG=0
|
2021-03-04 14:30:38 +03:00
|
|
|
|
2021-11-22 11:26:12 +03:00
|
|
|
# number of parallel threads for domain list resolves
|
|
|
|
MDIG_THREADS=30
|
|
|
|
|
2021-03-04 14:30:38 +03:00
|
|
|
# ipset/*.sh can compress large lists
|
|
|
|
GZIP_LISTS=1
|
|
|
|
# command to reload ip/host lists after update
|
|
|
|
# comment or leave empty for auto backend selection : ipset or ipfw if present
|
|
|
|
# on BSD systems with PF no auto reloading happens. you must provide your own command
|
|
|
|
# set to "-" to disable reload
|
|
|
|
#LISTS_RELOAD="pfctl -f /etc/pf.conf"
|
|
|
|
|
2023-12-12 21:00:22 +03:00
|
|
|
# override ports
|
|
|
|
#HTTP_PORTS=80-81,85
|
|
|
|
#HTTPS_PORTS=443,500-501
|
|
|
|
#QUIC_PORTS=443,444
|
|
|
|
|
2021-03-04 14:30:38 +03:00
|
|
|
# CHOOSE OPERATION MODE
|
2021-03-05 20:18:08 +03:00
|
|
|
# MODE : nfqws,tpws,tpws-socks,filter,custom
|
|
|
|
# nfqws : nfqws for dpi desync
|
|
|
|
# tpws : tpws transparent mode
|
|
|
|
# tpws-socks : tpws socks mode
|
2021-03-04 14:30:38 +03:00
|
|
|
# filter : no daemon, just create ipset or download hostlist
|
|
|
|
# custom : custom mode. should modify custom init script and add your own code
|
2023-10-26 20:29:44 +03:00
|
|
|
MODE=tpws
|
2021-03-04 14:30:38 +03:00
|
|
|
# apply fooling to http
|
|
|
|
MODE_HTTP=1
|
|
|
|
# for nfqws only. support http keep alives. enable only if DPI checks for http request in any outgoing packet
|
|
|
|
MODE_HTTP_KEEPALIVE=0
|
|
|
|
# apply fooling to https
|
|
|
|
MODE_HTTPS=1
|
2023-07-02 18:46:26 +03:00
|
|
|
# apply fooling to quic
|
|
|
|
MODE_QUIC=0
|
2023-10-26 15:13:46 +03:00
|
|
|
# none,ipset,hostlist,autohostlist
|
2023-10-26 15:36:09 +03:00
|
|
|
MODE_FILTER=none
|
2021-03-04 14:30:38 +03:00
|
|
|
|
|
|
|
# CHOOSE NFQWS DAEMON OPTIONS for DPI desync mode. run "nfq/nfqws --help" for option list
|
2024-09-18 19:27:50 +03:00
|
|
|
# SUFFIX VARS define additional lower priority desync profile. it's required if MODE_FILTER=hostlist and strategy has hostlist-incompatible 0-phase desync methods (syndata,wssize)
|
2021-03-04 14:30:38 +03:00
|
|
|
DESYNC_MARK=0x40000000
|
2024-03-02 17:53:37 +03:00
|
|
|
DESYNC_MARK_POSTNAT=0x20000000
|
2021-12-10 22:08:52 +03:00
|
|
|
NFQWS_OPT_DESYNC="--dpi-desync=fake --dpi-desync-ttl=0 --dpi-desync-ttl6=0 --dpi-desync-fooling=badsum"
|
2024-09-18 19:27:50 +03:00
|
|
|
#NFQWS_OPT_DESYNC_SUFFIX="--dpi-desync=syndata"
|
|
|
|
#NFQWS_OPT_DESYNC_HTTP=""
|
|
|
|
#NFQWS_OPT_DESYNC_HTTP_SUFFIX="--dpi-desync=syndata"
|
|
|
|
#NFQWS_OPT_DESYNC_HTTPS=""
|
|
|
|
#NFQWS_OPT_DESYNC_HTTPS_SUFFIX="--wssize 1:6"
|
|
|
|
#NFQWS_OPT_DESYNC_HTTP6=""
|
|
|
|
#NFQWS_OPT_DESYNC_HTTP6_SUFFIX="--dpi-desync=syndata"
|
|
|
|
#NFQWS_OPT_DESYNC_HTTPS6=""
|
|
|
|
#NFQWS_OPT_DESYNC_HTTPS6_SUFFIX="--wssize 1:6"
|
2024-03-25 23:09:10 +03:00
|
|
|
NFQWS_OPT_DESYNC_QUIC="--dpi-desync=fake --dpi-desync-repeats=6"
|
2024-09-18 19:27:50 +03:00
|
|
|
#NFQWS_OPT_DESYNC_QUIC_SUFFIX=""
|
2024-09-18 19:30:09 +03:00
|
|
|
#NFQWS_OPT_DESYNC_QUIC6="--dpi-desync=hopbyhop"
|
2024-09-18 19:27:50 +03:00
|
|
|
#NFQWS_OPT_DESYNC_QUIC6_SUFFIX=""
|
2021-03-04 14:30:38 +03:00
|
|
|
|
|
|
|
# CHOOSE TPWS DAEMON OPTIONS. run "tpws/tpws --help" for option list
|
2024-09-20 10:32:20 +03:00
|
|
|
# SUFFIX VARS define additional lower priority desync profile. it's required if MODE_FILTER=hostlist and strategy has hostlist-incompatible 0-phase desync methods (mss)
|
2024-03-23 11:37:58 +03:00
|
|
|
TPWS_OPT="--hostspell=HOST --split-http-req=method --split-pos=3 --oob"
|
2024-09-20 10:32:20 +03:00
|
|
|
#TPWS_OPT_SUFFIX="--mss 88"
|
2021-03-04 14:30:38 +03:00
|
|
|
|
|
|
|
# openwrt only : donttouch,none,software,hardware
|
|
|
|
FLOWOFFLOAD=donttouch
|
|
|
|
|
2021-09-28 22:43:43 +03:00
|
|
|
# openwrt: specify networks to be treated as LAN. default is "lan"
|
2021-09-28 22:44:33 +03:00
|
|
|
#OPENWRT_LAN="lan lan2 lan3"
|
2023-12-31 17:31:35 +03:00
|
|
|
# openwrt: specify networks to be treated as WAN. default wans are interfaces with default route
|
|
|
|
#OPENWRT_WAN4="wan vpn"
|
2024-01-06 10:22:36 +03:00
|
|
|
#OPENWRT_WAN6="wan6 vpn6"
|
2021-09-28 22:43:43 +03:00
|
|
|
|
2021-03-04 14:30:38 +03:00
|
|
|
# for routers based on desktop linux and macos. has no effect in openwrt.
|
2022-11-15 15:26:13 +03:00
|
|
|
# CHOOSE LAN and optinally WAN/WAN6 NETWORK INTERFACES
|
2021-03-04 14:30:38 +03:00
|
|
|
# or leave them commented if its not router
|
2021-09-28 22:43:43 +03:00
|
|
|
# it's possible to specify multiple interfaces like this : IFACE_LAN="eth0 eth1 eth2"
|
2022-11-15 15:26:13 +03:00
|
|
|
# if IFACE_WAN6 is not defined it take the value of IFACE_WAN
|
2021-03-04 14:30:38 +03:00
|
|
|
#IFACE_LAN=eth0
|
|
|
|
#IFACE_WAN=eth1
|
2022-11-15 15:26:13 +03:00
|
|
|
#IFACE_WAN6="ipsec0 wireguard0 he_net"
|
2021-03-04 14:30:38 +03:00
|
|
|
|
2022-02-15 17:15:36 +03:00
|
|
|
# should start/stop command of init scripts apply firewall rules ?
|
2022-02-18 12:38:48 +03:00
|
|
|
# not applicable to openwrt with firewall3+iptables
|
2021-03-04 14:30:38 +03:00
|
|
|
INIT_APPLY_FW=1
|
2022-02-18 12:35:06 +03:00
|
|
|
# firewall apply hooks
|
|
|
|
#INIT_FW_PRE_UP_HOOK="/etc/firewall.zapret.hook.pre_up"
|
|
|
|
#INIT_FW_POST_UP_HOOK="/etc/firewall.zapret.hook.post_up"
|
|
|
|
#INIT_FW_PRE_DOWN_HOOK="/etc/firewall.zapret.hook.pre_down"
|
|
|
|
#INIT_FW_POST_DOWN_HOOK="/etc/firewall.zapret.hook.post_down"
|
2021-03-04 14:30:38 +03:00
|
|
|
|
|
|
|
# do not work with ipv4
|
|
|
|
#DISABLE_IPV4=1
|
|
|
|
# do not work with ipv6
|
2023-12-12 21:03:56 +03:00
|
|
|
DISABLE_IPV6=1
|
2021-03-04 14:30:38 +03:00
|
|
|
|
|
|
|
# select which init script will be used to get ip or host list
|
|
|
|
# possible values : get_user.sh get_antizapret.sh get_combined.sh get_reestr.sh get_hostlist.sh
|
|
|
|
# comment if not required
|
|
|
|
GETLIST=get_antifilter_ipsmart.sh
|