aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2025-03-21 13:48:00 -0400
committerGitHub <noreply@github.com>2025-03-21 13:48:00 -0400
commitd3e509517c12ddf82adf8ab29a36da9da9bd2bd2 (patch)
tree1bf6faa3454cadbeabd2ca822585ba038f673e73 /internal
parent90049001e9fac3d11cbe4f45dee473f5b2601171 (diff)
downloadanubis-d3e509517c12ddf82adf8ab29a36da9da9bd2bd2.tar.xz
anubis-d3e509517c12ddf82adf8ab29a36da9da9bd2bd2.zip
cmd/anubis: configurable difficulty per-bot rule (#53)
Closes #30 Introduces the "challenge" field in bot rule definitions: ```json { "name": "generic-bot-catchall", "user_agent_regex": "(?i:bot|crawler)", "action": "CHALLENGE", "challenge": { "difficulty": 16, "report_as": 4, "algorithm": "slow" } } ``` This makes Anubis return a challenge page for every user agent with "bot" or "crawler" in it (case-insensitively) with difficulty 16 using the old "slow" algorithm but reporting in the client as difficulty 4. This is useful when you want to make certain clients in particular suffer. Additional validation and testing logic has been added to make sure that users do not define "impossible" challenge settings. If no algorithm is specified, Anubis defaults to the "fast" algorithm. Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'internal')
0 files changed, 0 insertions, 0 deletions