-
Notifications
You must be signed in to change notification settings - Fork 10
/
ipfilter.conf
121 lines (105 loc) · 6.5 KB
/
ipfilter.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# ipfilter.conf
# ------------------------------------------------------------------------------
# -
# IP Filter Updater & Generator (ipfilter) -
# -
# Created by Fonic (https://github.com/fonic) -
# Date: 04/15/19 - 08/18/24 -
# -
# ------------------------------------------------------------------------------
# Switch to toggle verbose output (for both console + log file)
# Format: String
# Example: VERBOSE_OUTPUT="true" | VERBOSE_OUTPUT="false"
# Default: VERBOSE_OUTPUT="false"
VERBOSE_OUTPUT="false"
# Path of file to log output to (folder + filename)
# NOTE: ${SCRIPT_DIR}: directory where 'ipfilter.sh' is stored, ${SCRIPT_NAME}: name of file 'ipfilter.sh' without extension
# Format: String
# Example: LOG_FILE="/var/log/ipfilter.log"
# Default: LOG_FILE="${SCRIPT_DIR}/${SCRIPT_NAME}.log"
LOG_FILE="${SCRIPT_DIR}/${SCRIPT_NAME}.log"
# Mode to use for logging and log file handling
# NOTE: Set to 'disabled' to disable logging entirely
# Format: String
# Example: LOG_MODE="disabled" | LOG_MODE="overwrite" | LOG_MODE="append"
# Default: LOG_MODE="append"
LOG_MODE="append"
# Switch to toggle colored output for log file
# Format: String
# Example: LOG_COLORS="true" | LOG_COLORS="false"
# Default: LOG_COLORS="false"
LOG_COLORS="false"
# Options to pass to curl when downloading files
# NOTE: To debug download issues, temporarily remove option '--fail' and check contents of downloaded files for server messages
# Format: Array of strings
# Example: CURL_OPTS=("--fail" "--location" "--silent" "--show-error" "--retry" "8" "--connect-timeout" "120" "--proxy" "<protocol>://<host>:<port>")
# Default: CURL_OPTS=("--fail" "--location" "--silent" "--show-error" "--retry" "2" "--connect-timeout" "60")
CURL_OPTS=("--fail" "--location" "--silent" "--show-error" "--retry" "2" "--connect-timeout" "60")
# Options to pass to wget when downloading files
# NOTE: wget is used only if curl is not available; do not add option '--quiet' here as this will also suppress error messages
# Format: Array of strings
# Example: WGET_OPTS=("--no-verbose" "--tries=9" "--timeout=120" "--execute" "use_proxy=yes" "--execute" "http_proxy=<host>:<port>")
# Default: WGET_OPTS=("--no-verbose" "--tries=3" "--timeout=60")
WGET_OPTS=("--no-verbose" "--tries=3" "--timeout=60")
# Username to use to download blocklists from I-BlockList (https://www.iblocklist.com)
# NOTE: A valid username is required to use the I-BlockList feature; this is the same username
# that you use to sign in to your I-BlockList account (https://www.iblocklist.com/login)
# Format: String
# Example: IBL_USER="user"
# Default: IBL_USER=""
IBL_USER=""
# PIN to use to download blocklists from I-BlockList (https://www.iblocklist.com)
# NOTE: A valid PIN is required to use the I-BlockList feature; to obtain your PIN, sign in to
# your I-BlockList account and click on the 'Member' button (or navigate manually to URL
# https://www.iblocklist.com/member)
# Format: String
# Example: IBL_PIN="123456"
# Default: IBL_PIN=""
IBL_PIN=""
# List of blocklists to download from I-BlockList (https://www.iblocklist.com)
# NOTE: To identify valid ids, inspect hyperlink targets or column 'Update URL' on this web page: https://www.iblocklist.com/lists
# e.g. 'level1' -> 'https://www.iblocklist.com/list?list=ydxerpxkpcfqjaybcssw' -> id is 'ydxerpxkpcfqjaybcssw' -> ["level1"]="ydxerpxkpcfqjaybcssw"
# Format: Array of name-id-pairs (i.e. string-string-pairs)
# Example: IBL_LISTS=(["badpeers"]="cwworuawihqvocglcoss" ["adservers"]="zhogegszwduurnvsyhdf")
# Default: IBL_LISTS=(["level1"]="ydxerpxkpcfqjaybcssw" ["level2"]="gyisgnzbhppbvsphucsw" ["level3"]="uwnukjqktoggdknzrhgh")
IBL_LISTS=(["level1"]="ydxerpxkpcfqjaybcssw" ["level2"]="gyisgnzbhppbvsphucsw" ["level3"]="uwnukjqktoggdknzrhgh")
# Account ID to use to download GeoLite2 country blocks database (https://dev.maxmind.com/geoip)
# NOTE: A valid account ID is required to use the GeoLite2 feature; to obtain your account ID, sign
# in to your MaxMind account and navigate to: My Account -> Account -> Account Information
# Format: String
# Example: GL2_ID="123456"
# Default: GL2_ID=""
GL2_ID=""
# License key to use to download GeoLite2 country blocks database (https://dev.maxmind.com/geoip)
# NOTE: A valid license key is required to use the GeoLite2 feature, see URL below for details:
# https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/
# Format: String
# Example: GL2_LICENSE="1a2b3c4d5e6f7g8h"
# Default: GL2_LICENSE=""
GL2_LICENSE=""
# List of countries to block using GeoLite2 country blocks (https://dev.maxmind.com/geoip)
# NOTE: For a list of valid country names, download ZIP archive from URL below and inspect file 'geolite2-country-locations-en.csv':
# https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&license_key=<your-gl2-license-key>&suffix=zip
# Format: Array of strings
# Example: GL2_COUNTRIES=("Tomorrowland" "Soldier Island" "Wonderland")
# Default: GL2_COUNTRIES=()
GL2_COUNTRIES=()
# IP protocol versions to process for GeoLite2 country blocks (https://dev.maxmind.com/geoip)
# NOTE: Only few applications actually support and recognize IPv6 ranges in .p2p files
# Format: Array of strings
# Example: GL2_IPVERS=("IPv4") | GL2_IPVERS=("IPv6") | GL2_IPVERS=("IPv4" "IPv6")
# Default: GL2_IPVERS=("IPv4")
GL2_IPVERS=("IPv4")
# Path to install final output file to (folder + filename)
# NOTE: ${SCRIPT_DIR}: directory where 'ipfilter.sh' is stored, ${SCRIPT_NAME}: name of file 'ipfilter.sh' without extension
# Correct file extension will be determined automatically, there is no need to modify this when changing 'COMP_TYPE'
# Format: String
# Example: INSTALL_DST="/tmp/blocklist.p2p"
# Default: INSTALL_DST="${SCRIPT_DIR}/${SCRIPT_NAME}.p2p"
INSTALL_DST="${SCRIPT_DIR}/${SCRIPT_NAME}.p2p"
# Type of compression to apply to final output file (in-place)
# NOTE: Correct file extension will be determined automatically, there is no need to modify 'INSTALL_DST' when changing this
# Format: String
# Example: COMP_TYPE="none" | COMP_TYPE="gzip" | COMP_TYPE="bzip2" | COMP_TYPE="xz" | COMP_TYPE="zip"
# Default: COMP_TYPE="none"
COMP_TYPE="none"