Fantasma Cero

A small, self-hosted Web Application Firewall that blocks or poisons AI / LLM scraper bots and automated abuse.

Description

Fantasma Cero is a minimalist and fast anti-AI/LLM WAF designed for those who need privacy and flexibility. It's similar to Cloudflare but the data remains yours.

Features

  • Blocks known AI / LLM crawler behavior
  • Optional JavaScript requirement
  • Optional Proof-of-Work challenges
  • Basic rate limiting
  • Trap endpoints for bot detection
  • Works behind Nginx or Caddy
  • Runs as a single binary
  • Stateless by default
  • Designed for self-hosting

Installation

The following is a placeholder example. Replace with real instructions.

1. Download and install a release
# set the proper release version
VERSION="v0.1.0"

curl -L -O https://github.com/cocky-punch/fantasma_cero/releases/download/$VERSION/fantasma_cero-$VERSION-x86_64-unknown-linux-gnu.tar.gz

tar -xzf fantasma_cero-$VERSION-x86_64-unknown-linux-gnu.tar.gz
cd fantasma_cero-$VERSION-x86_64-unknown-linux-gnu
2. Configure your backend and secrets in config.toml
cp config.example.toml config.toml
nano config.toml

3. Check the examples of the config of webservers in ./examples for Nginx, Caddy.
Edit the one you need accordingly: port, host, etc; copy it into or merge with your Nginx or Caddy config. Include it into your config.

4. Run the executable:
bash
./fantasma_cero

Configuration

Configuration is file-based and intentionally small. Sensible defaults are provided.

# config.toml, essential settings

[server]
port = 8080
js_check_enabled = true
js_token_secret = "{{your secret}}"

#
# validation_only | proxy
# "proxy" = proxy and validate; used for debugging
# validation_only - for production
#
operation_mode = "validation_only"

[pow_challenge]
# argon2 | sha256
algorithm = "sha256"

base_difficulty = 2
max_difficulty = 6
cookie_duration_days = 1

Project status

This is an early-stage open source project. Interfaces may change.

Contributions, issues, and design discussions are welcomed.