2019-07-13 08:56:22 +00:00
|
|
|
[
|
|
|
|
{
|
2020-04-10 15:25:03 +00:00
|
|
|
"name": "searx.space",
|
|
|
|
"filters": ["Header:X-Forwarded-For=(2001:41d0:8:de3::1|176.31.252.227)"],
|
2019-07-13 08:56:22 +00:00
|
|
|
"stop": true,
|
|
|
|
"actions": [{ "name": "log"}]
|
|
|
|
},
|
2019-07-30 07:10:10 +00:00
|
|
|
{
|
|
|
|
"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."}}
|
|
|
|
]
|
|
|
|
},
|
2019-07-13 08:56:22 +00:00
|
|
|
{
|
|
|
|
"name": "search request",
|
|
|
|
"filters": ["Param:q", "Path=^(/|/search)$"],
|
|
|
|
"subrules": [
|
|
|
|
{
|
|
|
|
"name": "robot agent forbidden",
|
|
|
|
"limit": 0,
|
2019-07-30 07:10:10 +00:00
|
|
|
"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)"],
|
2019-07-13 08:56:22 +00:00
|
|
|
"actions": [
|
2019-07-30 07:10:10 +00:00
|
|
|
{"name": "block",
|
2019-07-13 08:56:22 +00:00
|
|
|
"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": [
|
2019-07-30 07:10:10 +00:00
|
|
|
{"name": "block",
|
2019-07-13 08:56:22 +00:00
|
|
|
"params": {"message": "Rate limit exceeded"}}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "block missing accept-language",
|
|
|
|
"filters": ["!Header:Accept-Language"],
|
|
|
|
"limit": 0,
|
|
|
|
"stop": true,
|
|
|
|
"actions": [
|
|
|
|
{"name": "block",
|
2019-07-30 07:10:10 +00:00
|
|
|
"params": {"message": "Rate limit exceeded"}}
|
2019-07-13 08:56:22 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "block Connection:close",
|
2019-07-30 07:10:10 +00:00
|
|
|
"filters": ["Header:Connection=close"],
|
2019-07-13 08:56:22 +00:00
|
|
|
"limit": 0,
|
|
|
|
"stop": true,
|
|
|
|
"actions": [
|
|
|
|
{"name": "block",
|
2019-07-30 07:10:10 +00:00
|
|
|
"params": {"message": "Rate limit exceeded"}}
|
2019-07-13 08:56:22 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2020-04-26 09:29:12 +00:00
|
|
|
"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[;,])"],
|
2019-07-13 08:56:22 +00:00
|
|
|
"limit": 0,
|
|
|
|
"stop": true,
|
|
|
|
"actions": [
|
|
|
|
{"name": "block",
|
2019-07-30 07:10:10 +00:00
|
|
|
"params": {"message": "Rate limit exceeded"}}
|
2019-07-13 08:56:22 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2019-07-30 07:10:10 +00:00
|
|
|
"name": "block accept everything",
|
|
|
|
"filters": ["!Header:Accept=text/html"],
|
|
|
|
"limit": 0,
|
2019-07-13 08:56:22 +00:00
|
|
|
"stop": true,
|
|
|
|
"actions": [
|
2019-07-30 07:10:10 +00:00
|
|
|
{"name": "block",
|
|
|
|
"params": {"message": "Rate limit exceeded"}}
|
2019-07-13 08:56:22 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2019-07-30 07:10:10 +00:00
|
|
|
"name": "rss/json limit",
|
|
|
|
"interval": 3600,
|
|
|
|
"limit": 4,
|
2019-07-13 08:56:22 +00:00
|
|
|
"stop": true,
|
2019-07-30 07:10:10 +00:00
|
|
|
"filters": ["Param:format=(csv|json|rss)"],
|
|
|
|
"aggregations": ["Header:X-Forwarded-For"],
|
2019-07-13 08:56:22 +00:00
|
|
|
"actions": [
|
2019-07-30 07:10:10 +00:00
|
|
|
{"name": "block",
|
|
|
|
"params": {"message": "Rate limit exceeded, try again later."}}
|
2019-07-13 08:56:22 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2019-07-30 07:10:10 +00:00
|
|
|
"name": "IP limit",
|
|
|
|
"interval": 3,
|
|
|
|
"limit": 3,
|
|
|
|
"aggregations": ["Header:X-Forwarded-For"],
|
2019-07-13 08:56:22 +00:00
|
|
|
"actions": [
|
2019-07-30 07:10:10 +00:00
|
|
|
{"name": "block",
|
2019-07-13 08:56:22 +00:00
|
|
|
"params": {"message": "Rate limit exceeded, try again later."}}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2019-07-30 07:10:10 +00:00
|
|
|
"name": "IP and useragent limit",
|
|
|
|
"interval": 600,
|
|
|
|
"limit": 60,
|
2019-07-13 08:56:22 +00:00
|
|
|
"stop": true,
|
2019-07-30 07:10:10 +00:00
|
|
|
"aggregations": ["Header:X-Forwarded-For", "Header:User-Agent"],
|
2019-07-13 08:56:22 +00:00
|
|
|
"actions": [
|
|
|
|
{"name": "block",
|
2019-07-30 07:10:10 +00:00
|
|
|
"params": {"message": "Rate limit exceeded, try again later."}}
|
|
|
|
]
|
2019-07-13 08:56:22 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|