92 lines
No EOL
3.5 KiB
TOML
92 lines
No EOL
3.5 KiB
TOML
# =============================================================================
|
|
# IP FILTER CONFIGURATION
|
|
# =============================================================================
|
|
# This configuration controls the IP filtering middleware that blocks requests
|
|
# based on geographic location (country/continent) and network (ASN) information.
|
|
# =============================================================================
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# CORE SETTINGS
|
|
# -----------------------------------------------------------------------------
|
|
[Core]
|
|
# Enable or disable the IP filter entirely
|
|
Enabled = true
|
|
|
|
# MaxMind account ID for downloading GeoIP databases
|
|
# Can also be set via MAXMIND_ACCOUNT_ID environment variable or .env file
|
|
AccountID = ""
|
|
|
|
# MaxMind license key for downloading GeoIP databases
|
|
# Can also be set via MAXMIND_LICENSE_KEY environment variable or .env file
|
|
LicenseKey = ""
|
|
|
|
# How often to check for database updates (in hours)
|
|
DBUpdateIntervalHours = 12
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# CACHING SETTINGS
|
|
# -----------------------------------------------------------------------------
|
|
[Cache]
|
|
# TTL for cached IP block decisions (in seconds)
|
|
# 0 = cache indefinitely until server restart
|
|
IPBlockCacheTTLSec = 300
|
|
|
|
# Maximum number of cached IP decisions
|
|
# 0 = unlimited
|
|
IPBlockCacheMaxEntries = 10000
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# BLOCKING RULES
|
|
# -----------------------------------------------------------------------------
|
|
[Blocking]
|
|
# ISO country codes to block (2-letter codes)
|
|
CountryCodes = [
|
|
"IN", "BH", "AE", "OM", "QA", "KW", "SA", "YE", "IR", "IQ",
|
|
"LB", "PS", "CY", "TR", "AZ", "AM", "TM", "UZ", "KZ", "KG",
|
|
"TJ", "KE", "ET", "SO", "SD", "SS", "KP", "UA", "IL"
|
|
]
|
|
|
|
# Continent codes to block
|
|
ContinentCodes = ["AF", "SA", "AS", "AN"]
|
|
|
|
# Default block page when no specific page is configured
|
|
DefaultBlockPage = "/pages/ipfilter/default.html"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# ASN BLOCKING
|
|
# -----------------------------------------------------------------------------
|
|
# Block by Autonomous System Number (ASN)
|
|
# Group ASNs by category for different block pages
|
|
|
|
# [ASN.Example]
|
|
# Numbers = [12345, 67890]
|
|
# BlockPage = "pages/ipfilter/example.html"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# ASN NAME BLOCKING
|
|
# -----------------------------------------------------------------------------
|
|
# Block by ASN organization name patterns
|
|
|
|
[ASNNames.DataCenter]
|
|
# Block data center and cloud providers
|
|
Patterns = [
|
|
"Cloudflare", "GOOGLE-CLOUD-PLATFORM", "Microsoft", "Amazon", "AWS",
|
|
"Digitalocean", "OVH", "HUAWEI CLOUDS", "HWCLOUDS", "M247",
|
|
"Datacamp", "Datapacket", "Amanah", "Hern Labs"
|
|
]
|
|
BlockPage = "/pages/ipfilter/datacenter.html"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# COUNTRY-SPECIFIC BLOCK PAGES
|
|
# -----------------------------------------------------------------------------
|
|
[CountryBlockPages]
|
|
# Custom block pages for specific countries
|
|
IN = "/pages/ipfilter/india.html"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# CONTINENT-SPECIFIC BLOCK PAGES
|
|
# -----------------------------------------------------------------------------
|
|
[ContinentBlockPages]
|
|
# Custom block pages for specific continents
|
|
# AS = "pages/ipfilter/asia.html"
|
|
# AF = "pages/ipfilter/africa.html" |