A fault-injection reverse proxy: sits between a client and a real target
service, and lets you deliberately inject latency, error status codes, or
dropped connections, so you can test how your client handles a flaky
backend. Successor to gaze, same
spirit: small, focused, single static binary.
hobble -t https://api.example.com -l :8080 \
--latency 200ms-800ms \
--status 500=0.1 \
--drop 0.05Point your client at hobble instead of the real target, and observe how
it handles latency, errors, and dropped connections.
brew install mangrisano/hobble/hobblego install github.com/mangrisano/hobble/cmd/hobble@latestOr from a local clone:
go install ./cmd/hobbleThe binary lands in $(go env GOPATH)/bin, which must be on your PATH.
No Go toolchain? Grab a ready-made binary for your platform (Linux, macOS
and Windows, amd64/arm64) from the latest
release. For
example, on macOS (arm64):
VERSION=0.1.0
curl -sL "https://github.com/mangrisano/hobble/releases/download/v${VERSION}/hobble_${VERSION}_darwin_arm64.tar.gz" | tar xz
./hobble --helphobble [flags]
| Flag | Repeatable | Default | Description |
|---|---|---|---|
-t, --target |
no | — | Target URL to proxy requests to (required). |
-l, --listen |
no | :8080 |
Address to listen on. |
--latency |
no | 0 |
Latency to inject: fixed (200ms) or range (200ms-800ms). |
--status |
yes | — | Status code to inject with a probability, e.g. 500=0.1. |
--drop |
no | 0 |
Probability of dropping the connection (no response at all). |
Inject a fixed 500ms latency on every request:
hobble -t https://api.example.com --latency 500msReturn a 500 on 10% of requests, and a 503 on 5%:
hobble -t https://api.example.com --status 500=0.1 --status 503=0.05Simulate a flaky network: random latency, occasional 5xx, occasional dropped connection:
hobble -t https://api.example.com \
--latency 200ms-800ms \
--status 500=0.1 \
--drop 0.05Each request first rolls against --drop, then against the configured
--status rules, then (if neither fires) gets delayed by --latency
before being forwarded to the real target via a standard
httputil.ReverseProxy. Drop, status injection, and latency are mutually
exclusive per request — they don't stack on top of each other.
cmd/hobble/ package main — cobra flag parsing and wiring
internal/proxy/ package proxy — rule parsing, reverse proxy, fault middleware
go build ./...
go test ./...
go vet ./...Requires Go 1.27+.
MIT — see LICENSE.