summaryrefslogtreecommitdiff
path: root/config/searx/filtron.json
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2021-08-06 16:20:44 +0200
committerQuentin Aristote <quentin@aristote.fr>2021-08-06 16:20:44 +0200
commit210d4e7c2e7102355e8ef92681800157faa57d16 (patch)
treec1c599a66e34cc86056c094c438fe742ae41c03e /config/searx/filtron.json
initial commit
Diffstat (limited to 'config/searx/filtron.json')
-rw-r--r--config/searx/filtron.json129
1 files changed, 129 insertions, 0 deletions
diff --git a/config/searx/filtron.json b/config/searx/filtron.json
new file mode 100644
index 0000000..285d933
--- /dev/null
+++ b/config/searx/filtron.json
@@ -0,0 +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";
+ params = {
+ 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";
+ params = {
+ message = "Rate limit exceeded"
+ };
+ };
+ ];
+ };
+ {
+ name = "suspiciously frequent IP";
+ filters = [];
+ interval = 600;
+ limit = 30;
+ aggregations = [
+ "Header:X-Forwarded-For"
+ ];
+ 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"
+ };
+ };
+ ];
+ };
+ ];
+ };
+];