Repository navigation
Gymbag v0.1.0
Gymbag v0.1.0
First public release: a single-binary HTTPS reverse proxy with a built-in proof-of-work WAF, written in pure Go with no third-party modules.
Highlights
- TLS and certificates — ACME HTTP-01 with Let's Encrypt, ZeroSSL, Google Trust Services, SSL.com, LiteSSL, Buypass or any RFC 8555 CA, including external account binding. Certificates are cached per provider, renewed in the background within a configurable window and swapped atomically without dropping HTTP streams or WebSockets. A two-tier ECDSA P-256 local PKI covers
localhost,*.internal,*.localand*.test, with automatic/etc/hostsentries and one-time root CA trust. - Proof-of-work WAF — SHA-256 challenges with verify levels
0–3, HMAC-signed clearance cookies bound to host and client IP, and configurable clearance lifetimes (30m,12h,7d, …). Built-in baseline rules cover/.env,/.git,/wp-admin, scanner user agents and SQLi/XSS probes, backed by sharded per-IP rate limiting. - Threat intelligence — self-updating IPsum, Spamhaus DROP (IPv4/IPv6) and abuse.ch Feodo feeds, plus keyless Shodan InternetDB and StopForumSpam lookups. Published AI crawler CIDR lists (OpenAI, Anthropic, Perplexity, Google, Apple) catch scrapers even when they spoof a browser
User-Agent. - Firewall rules —
allow/verify/blockone-liners, multi-conditionruleblocks, remote rulesets over HTTP/HTTPS with ETag caching and last-known-good fallback, and local rule files or directories with dynamic hot reload (rules_watch_interval).gymbag rulesetmanages sources, files and individual rules. - Routing and config imports — ordered per-site path routes with reverse proxy, static file serving (index, directory browsing, SPA fallback), fixed
respond, redirects with{scheme}/{host}/{uri}/{path}/{query}placeholders and response header mutation. Gymbag natively reads nginx (nginx.conf), Apache (httpd.conf/apache2.conf) and Caddyfile v2 (snippets,import,@matchers,handle,route,file_server, …), and converts them to its own format. - Configuration and CLI —
gymbag.jsonis now the default generated config (Gymbagfile/Caddyfile still supported).gymbag config list|show|add|update|remove|route|set|unset|convertedits configs in place,gymbag initgains rule-source flags, and the service manager handles systemd, launchd, OpenRC and supervisor. A local Admin REST API can hot-patch sites, routes, headers and rule sources at runtime. - Packaging and docs — multi-arch Docker images, a Nix flake with a NixOS module, an Arch Linux package, and documentation in English, Simplified Chinese, Japanese, Korean and Spanish.
Performance
On an Apple M4 (10-core, macOS, Go 1.27.0) terminating TLS 1.3 with the same ECDSA P-256 certificate:
- ~72.5k RPS over HTTP/1.1 and ~64–66k RPS over HTTP/2 with the WAF enabled — about 32% and 63–69% faster than Caddy, roughly 30% less memory and a 3.8× smaller binary.
- ~85% of C-based Nginx's HTTP/1.1 throughput with p99 latency of 3.14 ms vs 6.20 ms.
- 140,680 req/s when rejecting
/.envand scanner probes at the edge, with no upstream traffic.
Install
- Build from source:
go build -o gymbag ./cmd/gymbag - Nix:
nix profile install github:Evil-Project/gymbag(or thenixosModules.defaultmodule) - Docker:
docker run -p 80:80 -p 443:443 ghcr.io/evil-project/gymbag:0.1.0 - Arch Linux: build from
packaging/arch/PKGBUILD
No binary assets are attached to this release.
Documentation
- English: https://evil-project.github.io/gymbag/
- 简体中文: https://evil-project.github.io/gymbag/zh/
- 日本語: https://evil-project.github.io/gymbag/ja/
- 한국어: https://evil-project.github.io/gymbag/ko/
- Español: https://evil-project.github.io/gymbag/es/
Quick start
./gymbag init -d app.example.com -u http://localhost:3000
./gymbagOr run an existing config directly:
./gymbag run -c /etc/nginx/nginx.conf