Skip to content

The Shrike is a Chaos HTTP/WebSocket proxy that impales victims on the Tree of Pain by selectively routing traffic with path based rules via Toxiproxy for TCP level mischief

License

richardbolt/shrike

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Shrike

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

Configuration is by both environment variables and command line flags with command line flags taking precedence.

Command line flags

-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.

Environment Variables

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.

Develop

This project uses Go 1.8 or later and uses Glide for package management.

Linux

make

Mac

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

Testing

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

About

The Shrike is a Chaos HTTP/WebSocket proxy that impales victims on the Tree of Pain by selectively routing traffic with path based rules via Toxiproxy for TCP level mischief

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published