A configurable API gateway and proxy server with dynamic policy middleware.
Bouncer is a lightweight API gateway that sits between clients and your backend services. It provides:
- Policy-based middleware for authentication, authorization, and more
- Database integration with PostgreSQL, Redis, and MongoDB
- Extensible architecture with support for custom policies
- Request proxying to backend services with token verification
For a comprehensive explanation of Bouncer's features and architecture, see docs/ABOUT.md.
# Install from crates.io cargo install bouncer # Or build from source git clone https://github.com/http-samc/bouncer.git cd bouncer cargo build --release- Create a configuration file
config.yaml:
# Required field specifying compatible Bouncer version bouncer_version: "0.1.*" server: port: 8080 bind_address: "0.0.0.0" destination_address: "http://my-backend-api.com" policies: - type: "@bouncer/auth/bearer" config: token: "my-secure-token"- Set the
BOUNCER_TOKENenvironment variable (optional but recommended):
export BOUNCER_TOKEN="your-secure-token-here"- Run Bouncer with your configuration:
bouncer --config config.yamlSee ABOUT.md for a comprehensive explanation of Bouncer and additional resources.
Licensed under the MIT license (LICENSE-MIT).
See CONTRIBUTING.md for contribution guidelines.