[Privoxy-users] Anti-AI protection on privoxy.org
Fabian Keil
fk at fabiankeil.de
Wed Nov 18 13:21:52 CET 2026
Michał Góral via Privoxy-users <privoxy-users at lists.privoxy.org> wrote on 2026-11-18 at 10:45:37:
> I noticed that accessing git requires a cookie, which is automatically
> done by some JS injected in the web page. I think this is cool technique,
> but I wonder how effective it is for you. Do you have any traffic stats
> before and after the cookie? Does protection still work for you, as it's
> trivial to bypass even with a single switch passed to curl?
>
> For context, I'm asking because I host my own git repo (with cgit) and I
> also have problems with AI scrappers eating valuable resources of my small,
> poor VPS. At some point I admitted defeat and disabled most endpoints via
> HTTP server rules, crippling the web interface to effectively show only
> the tree of each branch HEAD. Because of endless scraping I had to disable
> all diff views, logs, old blobs etc. It works but I feel really bad about
> it and I'm searching for other solutions.
The required Cookie isn't the only "protection" for www.privoxy.org,
there also is a User-Agent check that prevents "AI" crawlers that are
detected based on their User-Agent from accessing "/git".
The User-Agent check was added on 2025-12-04 and caused a significant
load reduction for a couple of weeks but then the load went up again
and I've added the Cookie check on 2026-01-29.
Both checks are handled by nginx.
I've made a Munin graph of the server's load average available at [0].
A graph of the number of requests per second served by nginx is
available at [1] and a graph of the system's total network traffic
is available at [2].
Higher load average correlates with lower system traffic because
when things are working well, most of the system's traffic is
caused by a Tor relay and if the load average gets too high,
the Tor process doesn't get enough cpu time.
While the number of requests per second handled by nginx seems
to be slowly rising again, most of the crawler requests still seem
to be answered with the 403 response which doesn't require a lot
of system resources so the spikes don't affect the system's load
average that much.
I just looked at a sample of the last 1.000.000 responses delivered
by nginx: ~70% of the requests got a response with HTTP status code
200 while ~29% got a 403.
Fabian
[0]: <https://www.fabiankeil.de/tmp/elektrobier2-munin-graph-load-avg-20261118.png>
[1]: <https://www.fabiankeil.de/tmp/elektrobier2-munin-graph-nginx-rps-privoxy.org-20261118.png>
[2]: <https://www.fabiankeil.de/tmp/elektrobier2-munin-graph-bge0-traffic-20261118.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 870 bytes
Desc: OpenPGP digital signature
URL: <https://lists.privoxy.org/pipermail/privoxy-users/attachments/20261118/f704b905/attachment.bin>
More information about the Privoxy-users
mailing list