zapret/config.default

133 lines
5.0 KiB
Plaintext
Raw Normal View History

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
2024-10-25 14:29:47 +03:00
# nftables only : set this to 0 to use pre-nat mode. default is post-nat.
# pre-nat mode disables some bypass techniques for forwarded traffic but allows to see client IP addresses in debug log
#POSTNAT=0
2022-02-15 17:15:36 +03:00
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"
# 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
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
# 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"
2024-10-25 14:29:47 +03:00
# mark bit used by nfqws to prevent loop
2021-03-04 14:30:38 +03:00
DESYNC_MARK=0x40000000
2024-03-02 17:53:37 +03:00
DESYNC_MARK_POSTNAT=0x20000000
2021-03-04 14:30:38 +03:00
2024-10-25 14:29:47 +03:00
TPWS_SOCKS_ENABLE=0
# tpws socks listens on this port on localhost and LAN interfaces
TPPORT_SOCKS=987
# use <HOSTLIST> placeholders to engage standard hostlists and autohostlist in ipset dir
# they are replaced to empty string if MODE_FILTER does not satisfy
TPWS_SOCKS_OPT="
--filter-tcp=80 --methodeol <HOSTLIST> --new
--filter-tcp=443 --split-tls=sni --disorder <HOSTLIST>
"
TPWS_ENABLE=0
TPWS_PORTS=80,443
# use <HOSTLIST> placeholders to engage standard hostlists and autohostlist in ipset dir
# they are replaced to empty string if MODE_FILTER does not satisfy
TPWS_OPT="
--filter-tcp=80 --methodeol <HOSTLIST> --new
--filter-tcp=443 --split-tls=sni --disorder <HOSTLIST>
"
NFQWS_ENABLE=0
# redirect outgoing traffic with connbytes limiter applied in both directions.
NFQWS_PORTS_TCP=80,443
NFQWS_PORTS_UDP=443
# PKT_OUT means connbytes dir original
# PKT_IN means connbytes dir reply
# this is --dpi-desync-cutoff=nX kernel mode implementation for linux. it saves a lot of CPU.
NFQWS_TCP_PKT_OUT=$((6+$AUTOHOSTLIST_RETRANS_THRESHOLD))
NFQWS_TCP_PKT_IN=3
NFQWS_UDP_PKT_OUT=$((6+$AUTOHOSTLIST_RETRANS_THRESHOLD))
NFQWS_UDP_PKT_IN=0
# redirect outgoing traffic without connbytes limiter and incoming with connbytes limiter
# normally it's needed only for stateless DPI that matches every packet in a single TCP session
# typical example are plain HTTP keep alives
# this mode can be very CPU consuming. enable with care !
#NFQWS_PORTS_TCP_KEEPALIVE=80
#NFQWS_PORTS_UDP_KEEPALIVE=
# use <HOSTLIST> placeholders to engage standard hostlists and autohostlist in ipset dir
# they are replaced to empty string if MODE_FILTER does not satisfy
NFQWS_OPT="
--filter-tcp=80 --dpi-desync=fake,split2 --dpi-desync-fooling=md5sig <HOSTLIST> --new
--filter-tcp=443 --dpi-desync=fake,disorder2 --dpi-desync-fooling=md5sig <HOSTLIST> --new
--filter-udp=443 --dpi-desync=fake --dpi-desync-repeats=6 <HOSTLIST>
"
# none,ipset,hostlist,autohostlist
MODE_FILTER=none
2021-03-04 14:30:38 +03:00
# openwrt only : donttouch,none,software,hardware
FLOWOFFLOAD=donttouch
# 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-03-04 14:30:38 +03:00
# for routers based on desktop linux and macos. has no effect in openwrt.
# CHOOSE LAN and optinally WAN/WAN6 NETWORK INTERFACES
2021-03-04 14:30:38 +03:00
# or leave them commented if its not router
# it's possible to specify multiple interfaces like this : IFACE_LAN="eth0 eth1 eth2"
# 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
#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
2024-10-20 16:19:11 +03:00
#GETLIST=