Skip to content

Elevated-Standards/RustWall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦€ RustWall πŸ›‘οΈ

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.

❓ What Problems Does RustWall Solve?

  • πŸ€– 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]

πŸ—οΈ Architecture

RustWall is built with a modular architecture consisting of specialized security modules:

πŸ›‘οΈ Core 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

πŸ”’ Privacy & Anonymity Modules

  • πŸ‘€ 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 Modules

  • 🚨 Operational (src/operational/) - Emergency shutdown, canary systems, health monitoring

✨ Features

βœ… Currently Active Features

�️ CAPTCHA System (Fully Implemented)

  • βœ… Analog clock image generation
  • βœ… Secure session management
  • βœ… Configurable difficulty levels
  • βœ… API endpoints for integration
  • βœ… Web interface and widget support

⚠️ Currently Inactive Features

πŸ›‘οΈ Basic DDoS Protection (Partially Implemented)

  • βœ… Basic rate limiting framework
  • βœ… IP blocking infrastructure
  • ⚠️ Traffic analysis (basic implementation)

οΏ½ Tor Network Security (Framework Ready)

  • βœ… Module structure and error handling
  • βœ… Configuration management
  • ⚠️ Core security features (implementation in progress)

🚧 In Development / Planned Features

πŸ›‘οΈ Advanced DDoS Protection (In Progress)

  • πŸ”„ Advanced rate limiting with configurable thresholds
  • πŸ”„ IP reputation management
  • πŸ”„ Real-time traffic analysis and anomaly detection
  • πŸ”„ Behavioral analysis and pattern recognition

πŸ” Complete Tor Network Security (Planned)

  • πŸ“‹ Onion service protection
  • πŸ“‹ Circuit analysis and monitoring
  • πŸ“‹ Exit node filtering
  • πŸ“‹ Rendezvous point security

πŸ‘€ Privacy & Anonymity (Planned)

  • πŸ“‹ Traffic pattern obfuscation
  • πŸ“‹ Timing attack protection
  • πŸ“‹ Connection mixing and pooling
  • πŸ“‹ Metadata scrubbing
  • πŸ“‹ Anti-correlation measures

πŸ›‘οΈ Content Security (Planned)

  • πŸ“‹ JavaScript sanitization
  • πŸ“‹ Image metadata removal (EXIF stripping)
  • πŸ“‹ Referrer policy enforcement
  • πŸ“‹ Font fingerprinting protection

🌐 Advanced Networking (Planned)

  • πŸ“‹ Automatic Tor configuration
  • πŸ“‹ Multi-onion address management
  • πŸ“‹ Tor bridge support
  • πŸ“‹ Decoy traffic generation
  • πŸ“‹ Multi-hop proxy chains
  • πŸ“‹ Steganographic communication

🚨 Operational Security (Planned)

  • πŸ“‹ Emergency shutdown procedures
  • πŸ“‹ Automated warrant canary updates
  • πŸ“‹ System health monitoring
  • πŸ“‹ Incident response automation
  • πŸ“‹ Secure backup management
  • πŸ“‹ Comprehensive audit logging

πŸ“Š Feature Status Legend

  • βœ… 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

πŸš€ Getting Started

πŸ› οΈ Prerequisites

πŸ“¦ Installation

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.

βš™οΈ Configuration

Edit the Config struct in src/config.rs to adjust settings such as:

  • ⏲️ Session timeout
  • 🚦 Rate limiting thresholds
  • 🌐 Allowed origins

πŸ“ Usage

πŸ–₯️ CAPTCHA System

Visit http://localhost:8080/captcha to see the analog clock CAPTCHA in action.

πŸ”— API Endpoints

CAPTCHA API

  • POST /api/captcha/new – Generate a new CAPTCHA challenge
  • POST /api/captcha/verify – Verify a user's response

Security API

  • GET /api/security/status – Get system security status
  • POST /api/security/emergency-shutdown – Trigger emergency shutdown
  • GET /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

🧩 Module Integration

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()?;

πŸ“ Project Structure

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

🀝 Contributing

Contributions are welcome! Please open issues or submit pull requests for new features, bug fixes, or documentation improvements.

πŸ› οΈ Development Guidelines

  • 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

πŸ“„ License

This project is licensed under the MIT License. See LICENSE for details.

πŸ™ Acknowledgments

  • Axum – High-performance web framework
  • Tera – Powerful templating engine
  • image – Image processing in Rust
  • tokio – Asynchronous runtime
  • serde – Serialization framework
  • Tor Project – Anonymity network inspiration

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published