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.
- json
- csv
- sitemap xml
- markov-chain bible text
- html
- env
- robots.txt (allows all user-agents)
cargo build --release
make install
sudo systemctl enable --now tarpitdocker compose up -don 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.tomlor with docker run:
docker run -d -p 25025:25025 \
-v /path/to/tarpit.toml:/etc/tarpit/tarpit.toml \
tarpitthis 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;
}