···11111212## [Unreleased]
13131414+## v1.20.0: Thancred Waters
1515+1616+The big ticket items are as follows:
1717+1818+- Implement a no-JS challenge method: [`metarefresh`](./admin/configuration/challenges/metarefresh.mdx) ([#95](https://github.com/TecharoHQ/anubis/issues/95))
1919+- Implement request "weight", allowing administrators to customize the behaviour of Anubis based on specific criteria
2020+- Implement GeoIP and ASN based checks via [Thoth](https://anubis.techaro.lol/docs/admin/thoth) ([#206](https://github.com/TecharoHQ/anubis/issues/206))
2121+- Add [custom weight thresholds](./admin/configuration/thresholds.mdx) via CEL ([#688](https://github.com/TecharoHQ/anubis/pull/688))
1422- Move Open Graph configuration [to the policy file](./admin/configuration/open-graph.mdx)
1515-- Enable support for default Open Graph metadata
2323+- Enable support for Open Graph metadata to be returned by default instead of doing lookups against the target
2424+- Add `robots2policy` CLI utility to convert robots.txt files to Anubis challenge policies using CEL expressions ([#409](https://github.com/TecharoHQ/anubis/issues/409))
2525+- Refactor challenge presentation logic to use a challenge registry
2626+- Allow challenge implementations to register HTTP routes
2727+2828+A lot of performance improvements have been made:
2929+3030+- Replace internal SHA256 hashing with xxhash for 4-6x performance improvement in policy evaluation and cache operations
3131+- Optimized the OGTags subsystem with reduced allocations and runtime per request by up to 66%
1632- Replace cidranger with bart for IP range checking, improving IP matching performance by 3-20x with zero heap
1733 allocations
3434+3535+And some cleanups/refactors were added:
3636+1837- Remove the unused `/test-error` endpoint and update the testing endpoint `/make-challenge` to only be enabled in
1938 development
2039- Add `--xff-strip-private` flag/envvar to toggle skipping X-Forwarded-For private addresses or not
2121-- Requests can have their weight be adjusted, if a request weighs zero or less than it is allowed through
2222-- Refactor challenge presentation logic to use a challenge registry
2323-- Allow challenge implementations to register HTTP routes
2424-- Implement a no-JS challenge method: [`metarefresh`](./admin/configuration/challenges/metarefresh.mdx) ([#95](https://github.com/TecharoHQ/anubis/issues/95))
2540- Bump AI-robots.txt to version 1.37
2641- Make progress bar styling more compatible (UXP, etc)
2727-- Optimized the OGTags subsystem with reduced allocations and runtime per request by up to 66%
2842- Add `--strip-base-prefix` flag/envvar to strip the base prefix from request paths when forwarding to target servers
2929-- Add `robots2policy` CLI utility to convert robots.txt files to Anubis challenge policies using CEL expressions ([#409](https://github.com/TecharoHQ/anubis/issues/409))
3030-- Implement GeoIP and ASN based checks via [Thoth](https://anubis.techaro.lol/docs/admin/thoth) ([#206](https://github.com/TecharoHQ/anubis/issues/206))
3131-- Replace internal SHA256 hashing with xxhash for 4-6x performance improvement in policy evaluation and cache operations
3232-- Add [custom weight thresholds](./admin/configuration/thresholds.mdx) via CEL ([#688](https://github.com/TecharoHQ/anubis/pull/688))
4343+4444+Request weight is one of the biggest ticket features in Anubis. This enables Anubis to be much closer to a Web Application Firewall and when combined with custom thresholds allows administrators to have Anubis take advanced reactions. For more information about request weight, see [the request weight section](./admin/policies.mdx#request-weight) of the policy file documentation.
4545+4646+TL;DR when you have one or more WEIGHT rules like this:
4747+4848+```yaml
4949+bots:
5050+ - name: gitea-session-token
5151+ action: WEIGH
5252+ expression:
5353+ all:
5454+ - '"Cookie" in headers'
5555+ - headers["Cookie"].contains("i_love_gitea=")
5656+ # Remove 5 weight points
5757+ weight:
5858+ adjust: -5
5959+```
6060+6161+You can configure custom thresholds like this:
6262+6363+```yaml
6464+thresholds:
6565+ - name: minimal-suspicion # This client is likely fine, its soul is lighter than a feather
6666+ expression: weight < 0 # a feather weighs zero units
6767+ action: ALLOW # Allow the traffic through
6868+6969+ # For clients that had some weight reduced through custom rules, give them a
7070+ # lightweight challenge.
7171+ - name: mild-suspicion
7272+ expression:
7373+ all:
7474+ - weight >= 0
7575+ - weight < 10
7676+ action: CHALLENGE
7777+ challenge:
7878+ # https://anubis.techaro.lol/docs/admin/configuration/challenges/metarefresh
7979+ algorithm: metarefresh
8080+ difficulty: 1
8181+ report_as: 1
8282+8383+ # For clients that are browser-like but have either gained points from custom
8484+ # rules or report as a standard browser.
8585+ - name: moderate-suspicion
8686+ expression:
8787+ all:
8888+ - weight >= 10
8989+ - weight < 20
9090+ action: CHALLENGE
9191+ challenge:
9292+ # https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
9393+ algorithm: fast
9494+ difficulty: 2 # two leading zeros, very fast for most clients
9595+ report_as: 2
9696+9797+ # For clients that are browser like and have gained many points from custom
9898+ # rules
9999+ - name: extreme-suspicion
100100+ expression: weight >= 20
101101+ action: CHALLENGE
102102+ challenge:
103103+ # https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work
104104+ algorithm: fast
105105+ difficulty: 4
106106+ report_as: 4
107107+```
108108+109109+These thresholds apply when no other `ALLOW`, `DENY`, or `CHALLENGE` rule matches the request. `WEIGHT` rules add and remove request weight as needed:
110110+111111+```yaml
112112+bots:
113113+ - name: gitea-session-token
114114+ action: WEIGH
115115+ expression:
116116+ all:
117117+ - '"Cookie" in headers'
118118+ - headers["Cookie"].contains("i_love_gitea=")
119119+ # Remove 5 weight points
120120+ weight:
121121+ adjust: -5
122122+123123+ - name: bot-like-user-agent
124124+ action: WEIGH
125125+ expression: '"Bot" in userAgent'
126126+ # Add 5 weight points
127127+ weight:
128128+ adjust: 5
129129+```
130130+131131+Of note: the default "generic browser" rule assigns 10 weight points:
132132+133133+```yaml
134134+# Generic catchall rule
135135+- name: generic-browser
136136+ user_agent_regex: >-
137137+ Mozilla|Opera
138138+ action: WEIGH
139139+ weight:
140140+ adjust: 10
141141+```
142142+143143+Adjust this as you see fit.
3314434145## v1.19.1: Jenomis cen Lexentale - Echo 1
35146