Crates.io | aegis-waf |
lib.rs | aegis-waf |
version | 3.3.1 |
source | src |
created_at | 2024-10-16 22:28:56.467197 |
updated_at | 2024-10-18 06:06:32.339815 |
description | simple web application firewall |
homepage | https://github.com/utibeabasi6/aegis |
repository | |
max_upload_size | |
id | 1412402 |
size | 133,650 |
Simple Web Application Firewall
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.
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
Aegis is designed to be simple and highly configurable. Once running, you can define custom rules for rate limiting, request filtering, and traffic monitoring.
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
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.
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.
This project is licensed under the MIT License. See the LICENSE
file for more details.