Skip to content
anakattPublic

About

ai scraper tar pit, serving multiple formats

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

tar pit

a simple tar pit that serves various formats by generating random bogus data. drip-feeds the data in 50-byte chunks with a configurable per-chunk delay. content is deterministic, so the same URL always returns the same output.

configured via /etc/tarpit/tarpit.toml (hot-reloaded every 5s). /__tarpit serves some stats about the service.

formats

  • json
  • csv
  • sitemap xml
  • markov-chain bible text
  • html
  • env
  • robots.txt (allows all user-agents)

setup (native)

cargo build --release
make install
sudo systemctl enable --now tarpit

docker

docker compose up -d

on first run, the app creates a default config and sqlite database inside /etc/tarpit. both persist across restarts via the named volume.

to use a custom config, add it to the compose volumes section in docker-compose.yml:

volumes:
  - /path/to/tarpit.toml:/etc/tarpit/tarpit.toml

or with docker run:

docker run -d -p 25025:25025 \
  -v /path/to/tarpit.toml:/etc/tarpit/tarpit.toml \
  tarpit

reverse proxy

this is supposed to be run behind a reverse proxy, like nginx:

location / {
    proxy_pass http://127.0.0.1:25025;
    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

About

ai scraper tar pit, serving multiple formats

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages