RustWall is a comprehensive Rust-based security solution that provides advanced site protection capabilities, DDoS protection, CAPTCHA verification, and specialized security features for Tor networks and privacy-focused applications. Built using Axum and Tera templating, it offers a robust, modular security layer for your applications.
- π€ Automated Bot Prevention: Advanced CAPTCHA system with analog clock challenges that effectively block automated scripts and bots without relying on JavaScript. [β COMPLETED]
- π‘οΈ DDoS Protection: Comprehensive DDoS mitigation including rate limiting, IP blocking, and traffic analysis to prevent service outages. [π IN PROGRESS]
- π Privacy & Anonymity: Advanced anonymity features including traffic obfuscation, timing attack protection, and anti-correlation measures. [π IN PROGRESS]
- π Tor Network Security: Specialized security features for .onion services including circuit analysis and rendezvous point protection. [π IN PROGRESS]
- π Content Security: JavaScript sanitization, metadata removal, and fingerprinting protection. [π IN PROGRESS]
- π¨ Operational Security: Emergency shutdown capabilities, warrant canary systems, and comprehensive audit logging. [π IN PROGRESS]
- π Network Integration: Advanced Tor integration with multi-onion management and steganographic channels. [π IN PROGRESS]
RustWall is built with a modular architecture consisting of specialized security modules:
- π« DDoS Protection (
src/ddos/
) - Rate limiting, IP blocking, and traffic analysis - π°οΈ CAPTCHA System (
src/captcha/
) - Analog clock challenges and session management - π Tor Security (
src/tor/
) - Specialized .onion service protection and circuit analysis
- π€ Anonymity (
src/anonymity/
) - Traffic obfuscation, timing protection, and anti-correlation - π‘οΈ Content Security (
src/content-security/
) - JS sanitization, metadata removal, font protection - π Network (
src/network/
) - Tor integration, multi-onion management, steganography
- π¨ Operational (
src/operational/
) - Emergency shutdown, canary systems, health monitoring
- β Analog clock image generation
- β Secure session management
- β Configurable difficulty levels
- β API endpoints for integration
- β Web interface and widget support
- β Basic rate limiting framework
- β IP blocking infrastructure
β οΈ Traffic analysis (basic implementation)
- β Module structure and error handling
- β Configuration management
β οΈ Core security features (implementation in progress)
- π Advanced rate limiting with configurable thresholds
- π IP reputation management
- π Real-time traffic analysis and anomaly detection
- π Behavioral analysis and pattern recognition
- π Onion service protection
- π Circuit analysis and monitoring
- π Exit node filtering
- π Rendezvous point security
- π Traffic pattern obfuscation
- π Timing attack protection
- π Connection mixing and pooling
- π Metadata scrubbing
- π Anti-correlation measures
- π JavaScript sanitization
- π Image metadata removal (EXIF stripping)
- π Referrer policy enforcement
- π Font fingerprinting protection
- π Automatic Tor configuration
- π Multi-onion address management
- π Tor bridge support
- π Decoy traffic generation
- π Multi-hop proxy chains
- π Steganographic communication
- π Emergency shutdown procedures
- π Automated warrant canary updates
- π System health monitoring
- π Incident response automation
- π Secure backup management
- π Comprehensive audit logging
- β Fully Implemented - Ready for production use
β οΈ Partially Implemented - Basic functionality available, improvements needed- π In Development - Actively being worked on
- π Planned - Module structure created, implementation pending
Clone the repository:
git clone https://github.com/austinsonger/rustwall.git
cd rustwall
Build and run:
cargo run
By default, the server will start on http://localhost:8080
.
Edit the Config
struct in src/config.rs
to adjust settings such as:
- β²οΈ Session timeout
- π¦ Rate limiting thresholds
- π Allowed origins
Visit http://localhost:8080/captcha
to see the analog clock CAPTCHA in action.
POST /api/captcha/new
β Generate a new CAPTCHA challengePOST /api/captcha/verify
β Verify a user's response
GET /api/security/status
β Get system security statusPOST /api/security/emergency-shutdown
β Trigger emergency shutdownGET /api/security/canary
β Get warrant canary status
Example requests:
# Generate new CAPTCHA
curl -X POST http://localhost:8080/api/captcha/new
# Check security status
curl -X GET http://localhost:8080/api/security/status
# Get warrant canary
curl -X GET http://localhost:8080/api/security/canary
Each security module can be enabled/disabled independently:
use rustwall::{
TorSecurityManager,
AnonymityManager,
ContentSecurityManager,
OperationalManager
};
// Initialize security managers
let tor_security = TorSecurityManager::new()?;
let anonymity = AnonymityManager::new()?;
let content_security = ContentSecurityManager::new()?;
let operational = OperationalManager::new()?;
src/
βββ lib.rs # Main library entry point
βββ anonymity/ # Privacy and anonymity features
β βββ traffic_obfuscation.rs
β βββ timing_protection.rs
β βββ connection_mixing.rs
β βββ metadata_scrubbing.rs
β βββ anti_correlation.rs
βββ captcha/ # CAPTCHA system
β βββ captcha.rs
β βββ session.rs
β βββ main.rs
βββ content-security/ # Content security features
β βββ js_sanitization.rs
β βββ image_metadata.rs
β βββ referrer_policy.rs
β βββ font_protection.rs
βββ ddos/ # DDoS protection
β βββ rate_limiting.rs
β βββ ip_blocking.rs
β βββ traffic_analysis.rs
βββ network/ # Advanced networking
β βββ tor_config.rs
β βββ multi_onion.rs
β βββ bridge_support.rs
β βββ circuit_control.rs
β βββ load_balancing.rs
β βββ decoy_traffic.rs
β βββ multi_hop_proxy.rs
β βββ steganography.rs
βββ operational/ # Operational security
β βββ emergency_shutdown.rs
β βββ canary_system.rs
β βββ health_monitoring.rs
β βββ incident_response.rs
β βββ backup_management.rs
β βββ audit_logging.rs
β βββ config_management.rs
βββ tor/ # Tor network security
βββ onion_service.rs
βββ ddos_mitigation.rs
βββ circuit_analysis.rs
βββ exit_node_filter.rs
βββ rendezvous_security.rs
Contributions are welcome! Please open issues or submit pull requests for new features, bug fixes, or documentation improvements.
- Follow Rust best practices and idioms
- Maintain modular architecture with clear separation of concerns
- Add comprehensive tests for new features
- Update documentation for any API changes
- Ensure all security features are properly tested
This project is licensed under the MIT License. See LICENSE for details.