4 stable releases
3.3.1 | Oct 18, 2024 |
---|---|
3.1.0 | Oct 17, 2024 |
3.0.0 | Oct 17, 2024 |
1.0.0 |
|
#69 in Database interfaces
487 downloads per month
52KB
1K
SLoC
Aegis
Simple Web Application Firewall
Features
- Rate Limiting with Redis: Prevent abuse and control traffic using Redis-backed rate limiting, ensuring that your services remain performant under heavy load.
- Custom Rules for Filtering Requests: Define custom rules to block, allow, or monitor web traffic based on parameters such as IP, headers, URI, and more.
- Hot Reload Configuration: Easily update firewall rules without downtime by reloading configurations on the fly.
Installation
-
Prerequisites:
-
Clone the Repository:
git clone https://github.com/utibeabasi6/aegis.git cd aegis
-
Run the Project: Make sure Redis is running:
docker run -p 6379:6379 redis
Then, start the Aegis firewall:
cargo run
Usage
Aegis is designed to be simple and highly configurable. Once running, you can define custom rules for rate limiting, request filtering, and traffic monitoring.
Installation
Install the latest version of Aegis by running the following command
cargo install aegis-waf
Start aegis by running
aegis --config-file /path/to/your/config.yaml
Example Config
upstream: "http://localhost:8000"
default_action: "Block"
rules:
- action: "Allow"
condition: "All"
type: "Regular"
statements:
- inspect:
Header:
key: "hello"
negate_statement: false
match_type: "Contains"
match_string: "world"
This rule only allows requests which have a header named hello
set to world
. For a description of the various fields, please refer to this document.
Contributing
We welcome contributions! To get started:
-
Fork the repository:
git clone https://github.com/utibeabasi6/aegis.git cd aegis
-
Create a feature branch:
git checkout -b feature-branch-name
-
Make your changes: Add new features, fix bugs, or improve documentation.
-
Commit your changes:
git add . git commit -m "Add feature or fix description"
-
Push to your branch:
git push origin feature-branch-name
-
Create a pull request: Go to the repository on GitHub and submit a pull request describing your changes.
License
This project is licensed under the MIT License. See the LICENSE
file for more details.
Contact
- Author: Utibeabasi Umanah
- Email: utibeabasiumanah6@gmail.com
- Project Repository: Aegis on GitHub
Dependencies
~27–41MB
~714K SLoC