AI Shit, go away; iocaine to the rescue
As a lot of people do, I have some content that is reachable using webbrowsers. There is the password manager Vaultwarden, an instance of Immich, ForgeJo for some personal git repos, my blog and some other random pages here and there.
All of this never had been a problem, running a webserver is a relatively simple task, no matter if you use apache2 , nginx or any of the other possibilities. And the things mentioned above bring their own daemon to serve the users.
AI crap
And then some idiot somewhere had the idea to ignore every law, every copyright and every normal behaviour and run some shit AI bot. And more idiots followed. And now we have more AI bots than humans generating traffic.
And those AI shit crawlers do not respect any limits. robots.txt, slow servers, anything to keep your meager little site up and alive? Them idiots throw more resources onto them to steal content. No sense at all.
iocaine to the rescue
So them AI bros want to ignore everything and just fetch the whole internet? Without any consideration if thats even wanted? Or legal? There are people who dislike this. I am one of them, but there are some who got annoyed enough to develop tools to fight the AI craziness. One of those tools is iocaine - it says about itself that it is The deadliest poison known to AI.
Feed AI bots sh*t
So you want content? You do not accept any Go away? Then here is content. It is crap, but appearently you don’t care. So have fun.
What iocaine does is (cite from their webpage) “not made for making the Crawlers go away. It is an aggressive defense mechanism that tries its best to take the blunt of the assault, serve them garbage, and keep them off of upstream resources”.
That is, instead of the expensive webapp using a lot of resources that are basically wasted for nothing, iocaine generates a small static page (with some links back to itself, so the crawler shit stays happy). Which takes a hell of a lot less resource than any fullblown app.
iocaine setup
The website has a https://iocaine.madhouse-project.org/documentation/, it is not hard to setup. Still, I had to adjust some things for my setup, as I use [Caddy Docker Proxy}([https://github.com/lucaslorentz/caddy-docker-proxy) nowadays and wanted to keep the config within the docker setup, that is, within the labels.
Caddy container
So my container setup for the caddy itself contains the following extra lines:
labels:
caddy_0.email: email@example.com
caddy_1: (iocaine)
caddy_1.0_@read: method GET HEAD
caddy_1.1_reverse_proxy: "@read iocaine:42069"
"caddy_1.1_reverse_proxy.@fallback": "status 421"
caddy_1.1_reverse_proxy.handle_response: "@fallback"This will be translated to the following Caddy config snippet:
(iocaine) {
@read method GET HEAD
reverse_proxy @read iocaine:42069 {
@fallback status 421
handle_response @fallback
}
}Any container that should be protected by iocaine
All the containers that are “behind” the Caddy reverse proxy can now get protected by iocaine with just one more line in their docker-compose.yaml. So now we have
labels:
caddy: service.example.com
caddy.reverse_proxy: "{{upstreams 3000}}"
caddy.import: iocainewhich translates to
service.example.com {
import iocaine
reverse_proxy 172.18.0.6:3000
}So with one simple extra label for the docker container I have iocaine activated.
Result? ByeBye (most) AI Bots
Looking at the services that got hammered most from those crap bots - deploying this iocaine container and telling Caddy about it solved the problem for me. 98% of the requests from the bots now go to iocaine and no longer hog resources in the actual services.
I wish it wouldn’t be neccessary to run such tools. But as long as we have shitheads doing the AI hype there is no hope. I wish they all would end up in Jail for all their various stealing they do. And someone with a little more brain left would set things up sensibly, then the AI thing could maybe turn out something good and useful.
But currently it is all crap.



