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 rustwallBuild and run:
cargo runBy 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/canaryEach 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.