Relintio Rust Agent SDK
The official in-process protection agent for Rust web application frameworks (Axum and Actix-web). Relintio blocks bots, credential stuffing, scraping, and other automated abuse in real-time.
Features
- Dynamic Ruleset Caching: Fetches WAF rules dynamically from the Relintio API and caches them locally to ensure offline safety and minimal lookup latency.
- Additive Scoring Engine: Inspects requests for client characteristics (missing headers, automated client user-agents, request rate bursts) and adds points up to 100.
- Token-bucket Rate Limiter: Built-in rate limits per client IP.
- Obsidian Layer (Axum): Injects anti-copy, right-click disabling, and DevTools blocking directly into HTML response payloads.
- Multiple Frameworks: First-class integrations for Axum and Actix-web.
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
To enable only a specific framework integration, disable default features:
[]
= { = "0.1.0", = false, = ["axum"] }
Quickstart
1. Axum Example
use Arc;
use ;
use ;
async
2. Actix-web Example
use Arc;
use ;
use ;
async
async
How It Works
- Rule Syncing: The agent pulls your custom security configuration (banned IPs, geo-fencing rules, rate limits) on boot, and updates it in a background thread every
sync_interval_secondsseconds. - Request Scoring: Incoming requests are evaluated dynamically. If the total score hits blocking thresholds, the middleware intercepts the call and serves a decoy, security challenge, or block screen.
- Fail-Open Policy: If the Relintio API is down, the agent fails open, ensuring no downtime for legitimate users.
License
This project is licensed under the MIT License.