From 9ffc1d6a967040cc7313418f6cf2eeb994115b75 Mon Sep 17 00:00:00 2001 From: hoelee Date: Wed, 13 May 2026 16:30:00 +0800 Subject: [PATCH] feat(botfilter): add botFilter --- botfilter.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 botfilter.go diff --git a/botfilter.go b/botfilter.go new file mode 100644 index 00000000..70a9da88 --- /dev/null +++ b/botfilter.go @@ -0,0 +1,23 @@ +// Package traefik_botfilter is a Traefik middleware plugin that blocks known scans +// and applies a bounded, in-memory per-IP suspicion score. +package botfilter + +import ( + "bufio" + "context" + "fmt" + "io" + "net" + "net/http" + "net/netip" + "strconv" + "time" +) + +type botFilter struct { + next http.Handler + config *compiledConfig + cache *clientCache + logger filterLogger +} +