summaryrefslogtreecommitdiff
path: root/utils/templates/etc
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-06-18 18:31:46 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2020-06-18 18:31:46 +0200
commit6ff20cef7385d6827042f00d295f51bbc213afab (patch)
treea0d1792d187acd442549467f4b3a701dc175a000 /utils/templates/etc
parentdda4a46f8ede4d4f035143cac864769873ad0236 (diff)
downloadsearxng-6ff20cef7385d6827042f00d295f51bbc213afab.tar.gz
searxng-6ff20cef7385d6827042f00d295f51bbc213afab.zip
[fix] indentation of filtron's rules (json)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/templates/etc')
-rw-r--r--utils/templates/etc/filtron/rules.json228
1 files changed, 115 insertions, 113 deletions
diff --git a/utils/templates/etc/filtron/rules.json b/utils/templates/etc/filtron/rules.json
index 8fbffa937..fff70fa8f 100644
--- a/utils/templates/etc/filtron/rules.json
+++ b/utils/templates/etc/filtron/rules.json
@@ -1,127 +1,129 @@
[
{
- "name": "roboagent limit",
- "filters": [
- "Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client|Ruby|UniversalFeedParser)"
- ],
- "limit": 0,
- "stop": true,
- "actions": [
- { "name": "log"},
- { "name": "block",
+ "name": "roboagent limit",
+ "filters": [
+ "Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client|Ruby|UniversalFeedParser)"
+ ],
+ "limit": 0,
+ "stop": true,
+ "actions": [
+ { "name": "log"},
+ { "name": "block",
"params": {
- "message": "Rate limit exceeded"
+ "message": "Rate limit exceeded"
}
- }
- ]
+ }
+ ]
},
{
- "name": "botlimit",
- "filters": [
- "Header:User-Agent=(Googlebot|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT)"
- ],
- "limit": 0,
- "stop": true,
- "actions": [
- { "name": "log"},
- { "name": "block",
+ "name": "botlimit",
+ "filters": [
+ "Header:User-Agent=(Googlebot|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT)"
+ ],
+ "limit": 0,
+ "stop": true,
+ "actions": [
+ { "name": "log"},
+ { "name": "block",
"params": {
- "message": "Rate limit exceeded"
+ "message": "Rate limit exceeded"
}
- }
- ]
+ }
+ ]
},
- { "name": "suspiciously frequent IP",
- "filters": [],
- "interval": 600,
- "limit": 30,
- "aggregations": [
- "Header:X-Forwarded-For"
+ {
+ "name": "suspiciously frequent IP",
+ "filters": [],
+ "interval": 600,
+ "limit": 30,
+ "aggregations": [
+ "Header:X-Forwarded-For"
],
- "actions":[
- {"name":"log"}
+ "actions":[
+ {"name":"log"}
]
},
- { "name": "search request",
- "filters": [
- "Param:q",
- "Path=^(/|/search)$"
- ],
- "interval": 61,
- "limit": 999,
- "subrules": [
- {
- "name": "missing Accept-Language",
- "filters": ["!Header:Accept-Language"],
- "limit": 0,
- "stop": true,
- "actions": [
- {"name":"log"},
- {"name": "block",
- "params": {"message": "Rate limit exceeded"}}
- ]
- },
- {
- "name": "suspiciously Connection=close header",
- "filters": ["Header:Connection=close"],
- "limit": 0,
- "stop": true,
- "actions": [
- {"name":"log"},
- {"name": "block",
- "params": {"message": "Rate limit exceeded"}}
- ]
- },
- {
- "name": "IP limit",
- "interval": 61,
- "limit": 9,
- "stop": true,
- "aggregations": [
- "Header:X-Forwarded-For"
- ],
- "actions": [
- { "name": "log"},
- { "name": "block",
- "params": {
- "message": "Rate limit exceeded"
- }
- }
- ]
- },
- {
- "name": "rss/json limit",
- "filters": [
- "Param:format=(csv|json|rss)"
- ],
- "interval": 121,
- "limit": 2,
- "stop": true,
- "actions": [
- { "name": "log"},
- { "name": "block",
- "params": {
- "message": "Rate limit exceeded"
- }
- }
- ]
- },
- {
- "name": "useragent limit",
- "interval": 61,
- "limit": 199,
- "aggregations": [
- "Header:User-Agent"
- ],
- "actions": [
- { "name": "log"},
- { "name": "block",
- "params": {
- "message": "Rate limit exceeded"
- }
- }
- ]
- }
- ]
+ {
+ "name": "search request",
+ "filters": [
+ "Param:q",
+ "Path=^(/|/search)$"
+ ],
+ "interval": 61,
+ "limit": 999,
+ "subrules": [
+ {
+ "name": "missing Accept-Language",
+ "filters": ["!Header:Accept-Language"],
+ "limit": 0,
+ "stop": true,
+ "actions": [
+ {"name":"log"},
+ {"name": "block",
+ "params": {"message": "Rate limit exceeded"}}
+ ]
+ },
+ {
+ "name": "suspiciously Connection=close header",
+ "filters": ["Header:Connection=close"],
+ "limit": 0,
+ "stop": true,
+ "actions": [
+ {"name":"log"},
+ {"name": "block",
+ "params": {"message": "Rate limit exceeded"}}
+ ]
+ },
+ {
+ "name": "IP limit",
+ "interval": 61,
+ "limit": 9,
+ "stop": true,
+ "aggregations": [
+ "Header:X-Forwarded-For"
+ ],
+ "actions": [
+ { "name": "log"},
+ { "name": "block",
+ "params": {
+ "message": "Rate limit exceeded"
+ }
+ }
+ ]
+ },
+ {
+ "name": "rss/json limit",
+ "filters": [
+ "Param:format=(csv|json|rss)"
+ ],
+ "interval": 121,
+ "limit": 2,
+ "stop": true,
+ "actions": [
+ { "name": "log"},
+ { "name": "block",
+ "params": {
+ "message": "Rate limit exceeded"
+ }
+ }
+ ]
+ },
+ {
+ "name": "useragent limit",
+ "interval": 61,
+ "limit": 199,
+ "aggregations": [
+ "Header:User-Agent"
+ ],
+ "actions": [
+ { "name": "log"},
+ { "name": "block",
+ "params": {
+ "message": "Rate limit exceeded"
+ }
+ }
+ ]
+ }
+ ]
}
]