From c4601690479e6fcc6a19baccfc3bbe45af69a575 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Wed, 6 May 2026 17:27:09 -0400 Subject: [PATCH] feat(web): waste headless chrome bandwidth Most of the worst of the worst scrapers run Headless Chrome. Headless Chrome is difficult for Anubis to combat because it follows all the rules that browsers do. The worst of the worst scrapers also use residential proxy services. Those residental proxy services charge upwards of $1 per GB of data egressed or ingressed. The Prompt API makes Chrome download a 4Gi or 16Gi machine learning model. When you ask it to start downloading, it will _continue_ downloading even when you leave the Anubis challenge page. This will make the local model answer "why is the sky blue?" in an absurt amount of detail, which wastes both bandwidth and scraper CPU (some scraping companies charge via Chrome CPU too). Signed-off-by: Xe Iaso --- docs/docs/CHANGELOG.md | 5 +++-- web/js/main.ts | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/docs/docs/CHANGELOG.md b/docs/docs/CHANGELOG.md index 2175ad86..13e76123 100644 --- a/docs/docs/CHANGELOG.md +++ b/docs/docs/CHANGELOG.md @@ -24,9 +24,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix CEL internal errors when iterating `headers`/`query` map wrappers by implementing map iterators for `HTTPHeaders` and `URLValues` ([#1465](https://github.com/TecharoHQ/anubis/pull/1465)). - Enable [metrics serving via TLS](./admin/policies.mdx#tls), including [mutual TLS (mTLS)](./admin/policies.mdx#mtls). - Enable [HTTP basic auth](./admin/policies.mdx#http-basic-authentication) for the metrics server. -- Fix a bug in the dataset poisoning maze that could allow denial of service [#1580](https://github.com/TecharoHQ/anubis/issues/1580). +- Fix a bug in the dataset poisoning maze that could allow denial of service .[#1580](https://github.com/TecharoHQ/anubis/issues/1580). - Add config option to add ASN to logs/metrics. -- Log weight when issuing challenge +- Log weight when issuing challenge. +- Waste bandwidth for headless chrome using the [Prompt API](https://developer.chrome.com/docs/ai/prompt-api). ## v1.25.0: Necron diff --git a/web/js/main.ts b/web/js/main.ts index b07d52d9..77024213 100644 --- a/web/js/main.ts +++ b/web/js/main.ts @@ -93,12 +93,31 @@ const initTranslations = async () => { translations = await loadTranslations(currentLang); }; +const wasteHeadlessChromeDisk = async () => { + if (window.LanguageModel !== undefined) { + const session = await window.LanguageModel.create({ + initialPrompts: [ + { + role: "system", + content: "You are a helpful assistant that responds in as many words as possible. Be verbose and answer questions fully with as much detail as possible." + }, + { + role: "user", + content: "Why is the sky blue?", + }, + ], + }) + } +}; + const t = (key) => translations[`js_${key}`] || translations[key] || key; (async () => { // Initialize translations first await initTranslations(); + wasteHeadlessChromeDisk(); + const dependencies = [ { name: "Web Workers",