From 1cc87c31aaa4e1558423565b4f3b8a586d7d94df Mon Sep 17 00:00:00 2001 From: Zankaria Date: Sun, 6 Oct 2024 12:37:45 +0200 Subject: [PATCH] config.php: refactor IPHub api to be a more generic IP api --- inc/config.php | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/inc/config.php b/inc/config.php index da37ab93..62b6b84a 100644 --- a/inc/config.php +++ b/inc/config.php @@ -236,18 +236,23 @@ // To prevent bump atacks; returns the thread to last position after the last post is deleted. $config['anti_bump_flood'] = false; - // IPHub API key for checking for bad proxies (leave blank to not use IPHub) https://iphub.info/api - $config['iphub_key'] = ""; - - // If you find that a lot of spammers are comming from a specific ISP, or ASN, - // you can put the ISP in iphub_banned_isps and/or the ASN in iphub_banned_asns - // USE THIS WITH CAUTION, IT MAY PREVENT NON-SPAMMERS FROM POSTING - $config['iphub_banned_isps'] = []; - $config['iphub_banned_asns'] = []; - - // IPs in this array won't be checked by IPHub - // This can be used if legitimate posters are getting blocked by IPHub - $config['iphub_whitelisted_ips'] = []; + // Use 3rd part APIs to check if an IP should be blocked. + $config['ip_api'] = [ + 'iphub' => [ + // Enable or disable the IPHub API backend. + 'enabled' => false, + // IPHub API key for checking for bad proxies (https://iphub.info/api). + 'key' => '', + ], + // If you find that a lot of spammers are coming from a specific ISP, or ASN, + // you can put the ISP in isp_blacklist and/or the ASN in asn_blacklist + // USE THIS WITH CAUTION, IT MAY PREVENT NON-SPAMMERS FROM POSTING + 'isp_blacklist' => [], + 'asn_blacklist' => [], + // IPs in this array won't be checked. + // This can be used if known legitimate posters are getting blocked by a backend. + 'ip_whitelist' => [] + ]; /* * Introduction to Tinyboard's spam filter: