Skip to content

Releases

Gymbag v0.2.0

Choose a tag to compare

@XiaoYuan151 XiaoYuan151 released this 26 Nov 15:50
236a37d

Gymbag v0.2.0

Gymbag now protects more than HTTP: the same proof-of-work gate covers SSH and Minecraft Java Edition, and one process can serve all three.

Highlights

  • SSH protection — unverified clients are answered inside the protocol with SSH_MSG_DISCONNECT carrying a one-time HTTPS verification link. gymbag init -t ssh picks an unused backend port, rewrites sshd_config with validation and rollback, reloads sshd, and updates ufw, firewalld, nftables, iptables/ip6tables, pf, ipfw or npf so the backend is loopback-only. Verified IPs relay as raw TCP, so the SSH handshake is never touched.
  • Minecraft protection — Server List Pings (nextState == 1 and legacy 0xFE) keep passing through so MOTD and player counts stay accurate, while Login and Transfer handshakes are inspected and gated. gymbag init -t minecraft rewires server.properties and can launch and supervise the server JAR with an auto-selected Java runtime.
  • In-memory limbo verification (1.20.5–26.1) — instead of a disconnect, supported clients land in a tiny purely in-memory empty world with a stone spawn platform and a clickable verification link in chat. Nothing is written to disk, and once the browser check passes the player is redirected into the real server with a Transfer packet (nextState=3 is rewritten to 2 so upstreams with accepts-transfers=false still accept them). Older and custom clients get the clickable "Connection Lost" prompt.
  • Managed Minecraft console — --mc-console (console on / "console": true) brings the live server console into Gymbag's terminal, gymbag console, and /api/v1/minecraft/console.
  • VPN, proxy and Tor detection — a new intelligence layer flags hosting/VPN egress IPs, feeding the same verify/block decisions as the existing threat feeds.
  • Authelia and forward_auth — sites can be gated behind Authelia or any Caddy-style forward_auth endpoint, with trusted-proxy aware client IP handling.
  • Service management on BSD — gymbag service now generates rc.d scripts for FreeBSD, OpenBSD and NetBSD alongside systemd, launchd, OpenRC and supervisor.
  • Single process, three services — HTTP, SSH and Minecraft run together with one shared verification portal (RFC 8738 ACME IP certificates, Local CA or self-signed fallback), short typable tokens and protocol-aware chat components.
  • Packaging — Debian .deb and NixOS packages are now attached to releases next to the Arch, tarball and Docker artifacts.

Upgrading from v0.1.0

Existing Gymbagfile / gymbag.json configurations keep working. SSH and Minecraft are opt-in through gymbag init -t ssh / -t minecraft or the ssh / minecraft config blocks.

Gymbag v0.1.0

Choose a tag to compare

@XiaoYuan151 XiaoYuan151 released this 21 Nov 08:16
cca902b

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, *.local and *.test, with automatic /etc/hosts entries 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 / block one-liners, multi-condition rule blocks, 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 ruleset manages 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.json is now the default generated config (Gymbagfile/Caddyfile still supported). gymbag config list|show|add|update|remove|route|set|unset|convert edits configs in place, gymbag init gains 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 /.env and 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 the nixosModules.default module)
  • 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

Quick start

./gymbag init -d app.example.com -u http://localhost:3000
./gymbag

Or run an existing config directly:

./gymbag run -c /etc/nginx/nginx.conf