From 8952fad37eb7e49f0b93bfe3a69c43ac6a7ccfcc Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Fri, 25 Feb 2022 23:37:40 +0100 Subject: [PATCH] Remove rules.json --- rules.json | 147 ----------------------------------------------------- 1 file changed, 147 deletions(-) delete mode 100644 rules.json diff --git a/rules.json b/rules.json deleted file mode 100644 index e77e93a..0000000 --- a/rules.json +++ /dev/null @@ -1,147 +0,0 @@ -[ - { - "name": "searx.space", - "filters": ["Header:X-Forwarded-For=nslookup(check.searx.space)"], - "stop": true, - "actions": [{ "name": "log"}] - }, - { - "name": "IP limit, all paths", - "interval": 3, - "limit": 25, - "aggregations": ["Header:X-Forwarded-For"], - "actions": [ - {"name": "block", - "params": {"message": "Rate limit exceeded, try again later."}} - ] - }, - { - "name": "useragent limit, all paths", - "interval": 30, - "limit": 200, - "aggregations": ["Header:X-Forwarded-For", "Header:User-Agent"], - "stop": true, - "actions": [ - {"name": "block", - "params": {"message": "Rate limit exceeded, try again later."}} - ] - }, - { - "name": "search request", - "filters": ["Param:q", "Path=^(/|/search)$"], - "subrules": [ - { - "name": "allow Firefox Android (issue #48 and #60)", - "filters": [ - "Param:q=^1$", - "Header:User-Agent=(^MozacFetch/[0-9]{2,3}.[0-9].[0-9]+$|^Mozilla/5.0 \\(Android [0-9]{1,2}(.[0-9]{1,2}.[0-9]{1,2})?; Mobile; rv:[0-9]{2,3}.[0-9]\\) Gecko/[0-9]{2,3}.[0-9] Firefox/[0-9]{2,3}.[0-9]$)" - ], - "stop": true, - "actions": [{"name": "log"}] - }, - { - "name": "robot agent forbidden", - "limit": 0, - "stop": true, - "filters": ["Header:User-Agent=([Cc][Uu][Rr][Ll]|[wW]get|Scrapy|splash|JavaFX|FeedFetcher|python-requests|Go-http-client|Java|Jakarta|okhttp|HttpClient|Jersey|Python|libwww-perl|Ruby|SynHttpClient|UniversalFeedParser)"], - "actions": [ - {"name": "block", - "params": {"message": "Rate limit exceeded"}} - ] - }, - { - "name": "bot forbidden", - "limit": 0, - "stop": true, - "filters": ["Header:User-Agent=(Googlebot|GoogleImageProxy|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT|Sogou|Abonti|Pixray|Spinn3r|SemrushBot|Exabot|ZmEu|BLEXBot|bitlybot)"], - "actions": [ - {"name": "block", - "params": {"message": "Rate limit exceeded"}} - ] - }, - { - "name": "block missing accept-language", - "filters": ["!Header:Accept-Language"], - "limit": 0, - "stop": true, - "actions": [ - {"name": "block", - "params": {"message": "Rate limit exceeded"}} - ] - }, - { - "name": "block Connection:close", - "filters": ["Header:Connection=close"], - "limit": 0, - "stop": true, - "actions": [ - {"name": "block", - "params": {"message": "Rate limit exceeded"}} - ] - }, - { - "name": "block no gzip support", - "filters": ["!Header:Accept-Encoding=(^gzip$|^gzip[;,]|[; ]gzip$|[; ]gzip[;,])"], - "limit": 0, - "stop": true, - "actions": [ - {"name": "block", - "params": {"message": "Rate limit exceeded"}} - ] - }, - { - "name": "block no deflate support", - "filters": ["!Header:Accept-Encoding=(^deflate$|^deflate[;,]|[; ]deflate$|[; ]deflate[;,])"], - "limit": 0, - "stop": true, - "actions": [ - {"name": "block", - "params": {"message": "Rate limit exceeded"}} - ] - }, - { - "name": "block accept everything", - "filters": ["!Header:Accept=text/html"], - "limit": 0, - "stop": true, - "actions": [ - {"name": "block", - "params": {"message": "Rate limit exceeded"}} - ] - }, - { - "name": "rss/json limit", - "interval": 3600, - "limit": 4, - "stop": true, - "filters": ["Param:format=(csv|json|rss)"], - "aggregations": ["Header:X-Forwarded-For"], - "actions": [ - {"name": "block", - "params": {"message": "Rate limit exceeded, try again later."}} - ] - }, - { - "name": "IP limit", - "interval": 3, - "limit": 3, - "aggregations": ["Header:X-Forwarded-For"], - "actions": [ - {"name": "block", - "params": {"message": "Rate limit exceeded, try again later."}} - ] - }, - { - "name": "IP and useragent limit", - "interval": 600, - "limit": 60, - "stop": true, - "aggregations": ["Header:X-Forwarded-For", "Header:User-Agent"], - "actions": [ - {"name": "block", - "params": {"message": "Rate limit exceeded, try again later."}} - ] - } - ] - } -]