The Shrike is a Layer 7 Chaos HTTP/WebSocket proxy that impales it's victims on the Tree of Pain. The Tree of Pain for this Shrike takes the form of Toxiproxy, an excellent TCP network tampering tool.
The Shrike is designed for resliliency testing a whole environment and has an API to route http path based traffic through an embedded Toxiproxy instance.
The Shrike currently assumes you've put it close at the edge of your service stack thus the current single upstream location which is assumed to be your gateway.
Path prefix matching is used to route differing paths for testing while unmatched paths are sent straight on to the gateway.
Configuration is by both environment variables and command line flags with command line flags taking precedence.
-host is the address to bind to on the host. Defaults to 0.0.0.0.
-port is the proxy forwarder listen port to bind to on the host. Defaults to 8080.
-apiport is the api listen port to bind to on the host. Defaults to 8075.
-upstream is the upstream HTTP/WS proxy we are sitting in front of. Defaults to http://127.0.0.1.
HOST is the address to bind to on the host. Defaults to 0.0.0.0.
PORT is the proxy forwarder listen port to bind to on the host. Defaults to 8080.
API_PORT is the api listen port to bind to on the host. Defaults to 8075.
UPSTREAM_URL is the upstream HTTP/WS proxy we are sitting in front of. Defaults to http://127.0.0.1.
PORT and API_PORT can be the same value and The Shrike proxy and api will be bound to the same port. This means that /ping and /routes* requests will be intercepted by Shrike and your Shrike control API may be exposed.
This project uses Go 1.8 or later and uses Glide for package management.
make
make mac
To add or update dependencies in the vendor folder, please use Glide:
curl https://glide.sh/get | sh # only necessary if you don't have Glide installed already.
glide install
Run the test suites with Ginkgo installed and get coverage output:
make ginkgo
Run the test suites without Ginkgo (less awesome output, no randomization of tests):
make test