Verify Levels (0–3) & Proof-of-Work
One Gymbag process can front multiple websites (with round-robin upstream load balancing and RFC 6455 WebSocket upgrades) alongside SSH and Minecraft protection. Each site and service sets its policy with verify <0-3>, or turns off PoW challenges with protect off.
verify 3 — Challenges suspicious clients/IPs (including VPN/proxy/Tor IPs) and AI crawlers, while regular browsers pass right through.
| Client / Traffic | Action | Why |
|---|---|---|
| Chrome / Firefox / Safari | Pass Through | Normal browser headers and clean IP |
| GPTBot / ClaudeBot / Applebot | PoW Challenge | Matched official AI CIDR list or AI UA |
| VPN / Proxy / Tor IP | PoW Challenge | Flagged by X4BNet/Tor lists or live ipquery.io / ipapi.is check (HTTP, SSH, Minecraft) |
| curl / python-requests / Headless | PoW Challenge | Automation UA, missing headers, or scripted SSH/MC client |
| Spamhaus / IPsum Threat IP | PoW (or 403) | Threat feed hit (verify by default, or 403 when ip_security_action is block) |
| GET /.env, /wp-admin, sqlmap | 403 Blocked | Built-in default_rules baseline rule |
Challenge States
Gymbag embeds the PoW challenge HTML, SHA-256 browser solver, and three mascot images directly in the binary:
Solving PoWChallenge Issued
Clearance Grantedwaf_clearance Set
Rule / Threat Block403 ForbiddenMulti-Site & Multi-Service Example
app.example.com, www.example.com {
reverse_proxy http://localhost:3000 http://localhost:3001
verify 3
difficulty 4
verify_timeout 12h
}
docs.example.com {
reverse_proxy http://localhost:4000
verify 2
verify_timeout 7d
}
api.example.com {
reverse_proxy http://localhost:8080
verify 1
}
staging.example.com {
reverse_proxy http://localhost:3002
verify 0
verify_timeout 30m
}
static.example.com {
reverse_proxy http://localhost:9000
protect off
}
ssh {
upstream 127.0.0.1:41822
verify 3
}At levels 1 and 3, suspicious traffic includes VPN, proxy, and Tor exit IPs (vpn_detection on) in addition to threat feeds, live Shodan/StopForumSpam hits, missing browser headers, automation clients, exploit probes, and scripted SSH/Minecraft clients.
Verified Status Timeout (verify_timeout / clearance_ttl)
On HTTP/HTTPS sites, solving the SHA-256 PoW challenge issues an HttpOnly, SameSite=Lax HMAC-signed cookie (waf_clearance by default) bound to host and client IP. On SSH and Minecraft, solving the browser verification link stores an IP clearance record for that service.
The default lifetime is 24 hours (86400 seconds). Override it globally or per site/service with integer seconds or duration strings (30m, 12h, 1h30m, 7d, 2w):
{
verify_timeout 12h
}
staging.example.com {
reverse_proxy http://localhost:3002
verify 0
verify_timeout 30m
}
docs.example.com {
reverse_proxy http://localhost:4000
verify 2
clearance_ttl 7d
}gymbag init -d app.example.com -u :3000 --verify-timeout 6h
gymbag run --config Gymbagfile --verify-timeout 30m
gymbag reverse-proxy --from app.internal --to :3000 --verify 0 --verify-timeout 15mGYMBAG_VERIFY_TIMEOUT=12h gymbag
GYMBAG_CLEARANCE_TTL=3600 gymbagcurl -X PATCH http://127.0.0.1:2019/api/v1/sites/staging.example.com \
-H "Content-Type: application/json" \
-d '{"clearance_ttl": 1800}'- Accepted directive aliases in
Gymbagfile:verify_timeout,verified_timeout,clearance_timeout,clearance_ttl. - Accepted env var aliases:
GYMBAG_CLEARANCE_TTL,GYMBAG_VERIFY_TIMEOUT,GYMBAG_VERIFIED_TIMEOUT. POST /.waf/v1/verificationsreturns{"ok": true, "expires_in": <seconds>}and setsMax-Ageto the configured TTL.GET /.waf/v1/sessionreturnsclearance_ttl, plusexpires_at(RFC 3339 UTC) andexpires_infor cleared browsers.
Difficulty, Challenge Window, and Rate Limits
difficulty(1–5, default4): Number of leading hex zeros required in the SHA-256 digest (0000...at difficulty4).challenge_ttl(default300s /5m): Expiry for single-use challenge nonces.clearance_ttl/verify_timeout(default86400s /24h): Lifetime of the clearance cookie or TCP IP clearance.rate_limit/rate_window: Fixed-window per-IP request limiter. Sites default to240requests per60s;sshandminecraftblocks default to60attempts per60s.