How does Anubis identify a good bot? I'd like Google to be able to index, but want to be sure it's coming directly from Google and not a bot spoofing Google. (I'd like to think it checks the ASN or IPs to determine that.)
BTW, posting configs for Anubis is very helpful for someone like me. I absolutely refuse to use or trust AI (why contribute to our bot issues and increase the harm on our environment?), so if anyone has proven, battle-tested configs, that is the most helpful.
Somewhat related to that idea: I wish we had a way to use more of the headers in XF. I am starting to think that if a thread is locked, or we move it to an "archive" forum, we would be able to let Google and others we allow to index those threads, yet guests would have to sign up to read them. (The permission could be to let guests see thread titles and maybe a few posts as a teaser, but require joining to view the entire thread.) And the bots would have very little to chew on and not drag down the server. We could use the CF "verified bots" header to help with that, as an example.
Breaking down your quote a little bit here...
How does Anubis identify a good bot?
Premade rules, you can see most of them here:
https://github.com/TecharoHQ/anubis/tree/main/data and googlebot is located at:
https://github.com/TecharoHQ/anubis/blob/main/data/crawlers/googlebot.yaml
It validates a partial UA regex match on top of a rDNS lookup of the connecting IP.
BTW, posting configs for Anubis is very helpful for someone like me.
Feel free to ask away with Anubis stuff with XenForo configurations. The one i posted above is fairly bog-standard when it comes to a XF2 config.
For example, you can always restrict an unauthed client further by monitoring for certain URL paths, e.g.,
./threads/,
./posts/. For example, if you have a ton of old, archaic threads (effectively in an 'archive like' state), let's say from 1 to 100000... you could add a rule after the xf_user cookie check that significantly (challenge levels i feel are a bit on an exponential curve) increases a challenge level from 4 to 5 or 6 when a regex match to a thread ID from 1 to 100000 is satisfied:
YAML:
- name: challenge-old-threads
action: CHALLENGE
path_regex: ^/threads/(?:[^/]*\.)?(?:[1-9][0-9]{0,4}|100000)(?:/|$)
challenge:
algorithm: fast
difficulty: 6
Granted, this particular regex is only good when you enforce URL rewriting with the XF2 pretty-URLs. I personally wouldn't use the example above though, as it would be blanket challenging
all guests to very old threads, at a level of 6 - that
will take a while to complete.
Now, a more useful item could be something like this:
YAML:
- name: challenge-search-whatsnew
action: CHALLENGE
path_regex: ^/(search|whats-new)(/.*)?$
challenge:
algorithm: fast
difficulty: 5
This will forcefully challenge anything (depending on where you place it in the
bots: ruleset list (it's FIFO)) hitting the
search or
whats-new URL segments.
I wish we had a way to use more of the headers in XF.
Oh, now there's an addon idea!
Insert a browser header prefixed with
X-XF-DiscussionState to denote a threads 'openness':
open,
closed,
archived. Where
archived would be a special state as an override to closed depicting the thread is exceptionally old (an addon would need to be aware of a threads last post date versus the configured limit set in the addon).
Then another for
X-XF-LastModified that could use Linux epoch time to depict when a thread was last posted to. Those two headers in itself could help Anubis (and other WAF's) be a bit more dynamic. At that point, weights (thresholds) could be utilized via Anubis to dynamically set a challenge level - or a challenge at all.