Skip to content
achird-labsPublic

Repository files navigation

Rift

CI Release crates.io Docker Docs

A Mountebank-compatible HTTP/HTTPS mock server written in Rust. It loads your existing imposters.json unchanged, keeps its throughput flat as the stub file grows, and embeds in-process in Java, Node, Go and Scala.

A request reaches an imposter, is checked against its stubs in order, and the first match answers from its response cycle; a proxy stub records an upstream answer into a new stub that later requests replay.

Documentation: getting started, features, Mountebank compatibility, SDKs, deployment, performance.

docker run -p 2525:2525 -p 4545:4545 zainalpour/rift-proxy:latest

curl -X POST http://localhost:2525/imposters -H 'Content-Type: application/json' -d '{
  "port": 4545, "protocol": "http",
  "stubs": [{ "predicates": [{ "equals": { "path": "/hello" } }],
              "responses":  [{ "is": { "statusCode": 200, "body": "Hello, World!" } }] }]
}'

curl http://localhost:4545/hello   # Hello, World!

Also on Homebrew (brew install achird-labs/rift/rift), crates.io (cargo install rift-http-proxy) and GitHub Releases; SDKs for Java, Node, Go and Scala.

Rift is compatible with Mountebank 2.9.5: every engine change is checked against it by a differential harness that sends both the same requests and fails on any difference that is not documented. Moving from the first stub of a 310-stub imposter to the last costs Rift under 1% of its throughput; Mountebank loses 84% (benchmarks).

Used by zio-bdd and zio-openfeature. Contributing · Apache 2.0.

Releases

Sponsor this project

Packages

Contributors

Languages