| Crates.io | rift-http-proxy |
| lib.rs | rift-http-proxy |
| version | 0.1.0-RC13 |
| created_at | 2026-01-02 23:23:04.213377+00 |
| updated_at | 2026-01-05 01:43:08.048326+00 |
| description | Rift: high-performance HTTP chaos engineering proxy with Lua/Rhai/JavaScript scripting for fault injection. |
| homepage | https://github.com/EtaCassiopeia/rift |
| repository | https://github.com/EtaCassiopeia/rift |
| max_upload_size | |
| id | 2019328 |
| size | 1,103,335 |
High-performance Mountebank-compatible HTTP/HTTPS mock server written in Rust
Rift is a high-performance, Mountebank-compatible mock server that delivers 2-250x better performance. Use your existing Mountebank configurations and enjoy faster test execution.
Documentation | Quick Start | Examples
imposters.json without changes| Feature | Mountebank | Rift | Speedup |
|---|---|---|---|
| Simple stubs | 1,900 RPS | 39,000 RPS | 20x faster |
| JSONPath predicates | 107 RPS | 26,500 RPS | 247x faster |
| XPath predicates | 169 RPS | 28,700 RPS | 170x faster |
| Complex predicates | 900 RPS | 29,300 RPS | 32x faster |
# Pull and run (from GitHub Container Registry)
docker pull ghcr.io/etacassiopeia/rift-proxy:latest
docker run -p 2525:2525 ghcr.io/etacassiopeia/rift-proxy:latest
# Or from Docker Hub
docker pull etacassiopeia/rift-proxy:latest
# Create your first imposter
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!" } }]
}]
}'
# Test it
curl http://localhost:4545/hello
# Load your existing imposters.json
docker run -p 2525:2525 -v $(pwd)/imposters.json:/imposters.json \
ghcr.io/etacassiopeia/rift-proxy:latest --configfile /imposters.json
# GitHub Container Registry (recommended)
docker pull ghcr.io/etacassiopeia/rift-proxy:latest
# Or Docker Hub
docker pull etacassiopeia/rift-proxy:latest
brew tap etacassiopeia/rift
brew install rift
cargo install rift-http-proxy
Download pre-built binaries from GitHub Releases:
# Example for Linux x86_64
curl -LO https://github.com/EtaCassiopeia/rift/releases/latest/download/rift-vX.X.X-x86_64-unknown-linux-gnu.tar.gz
tar -xzf rift-vX.X.X-x86_64-unknown-linux-gnu.tar.gz
sudo mv rift-vX.X.X-x86_64-unknown-linux-gnu/bin/* /usr/local/bin/
Available platforms:
x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, x86_64-unknown-linux-musl, aarch64-unknown-linux-muslx86_64-apple-darwin, aarch64-apple-darwinx86_64-pc-windows-msvcgit clone https://github.com/EtaCassiopeia/rift.git
cd rift
cargo build --release
./target/release/rift-http-proxy
For Node.js projects, use the official npm package:
npm install @rift-vs/rift
import rift from '@rift-vs/rift';
const server = await rift.create({ port: 2525 });
// Create imposters, run tests...
await server.close();
{
"port": 4545,
"protocol": "http",
"name": "User Service",
"stubs": [
{
"predicates": [{ "equals": { "method": "GET", "path": "/users" } }],
"responses": [{
"is": {
"statusCode": 200,
"headers": { "Content-Type": "application/json" },
"body": [{ "id": 1, "name": "Alice" }]
}
}]
},
{
"predicates": [{
"and": [
{ "equals": { "method": "GET" } },
{ "matches": { "path": "/users/\\d+" } }
]
}],
"responses": [{
"is": { "statusCode": 200, "body": { "id": 1, "name": "Alice" } }
}]
}
]
}
More examples in examples/.
Prometheus metrics on :9090/metrics:
curl http://localhost:9090/metrics
Metrics include request counts, latency histograms, fault injection stats, and more.
Rift includes additional command-line tools. All tools are included when you install via Homebrew or download release binaries.
Manage imposters and stubs through an interactive terminal interface:
# If installed via Homebrew or release binary
rift-tui
# Connect to a different admin URL
rift-tui --admin-url http://localhost:2525
Features:
Automatically test your imposters by generating requests from predicates:
rift-verify --show-curl
Validate imposter configuration files before loading:
# If installed via Homebrew or release binary
rift-lint ./imposters/
# Via Docker (for CI/CD)
docker run --rm -v $(pwd):/imposters ghcr.io/etacassiopeia/rift-lint .
# Via cargo
cargo install rift-lint
rift-lint ./imposters/
# Build
cargo build --release
# Run tests
cargo test --all
# Run with debug logging
RUST_LOG=debug ./target/release/rift-http-proxy
# Run benchmarks
cd tests/benchmark && ./scripts/run-benchmark.sh
Contributions welcome! Please read our contributing guidelines and submit PRs.
Apache License 2.0 - see LICENSE for details.