|
1 | 1 | # IronDrop |
2 | 2 |
|
3 | 3 | <div align="center"> |
4 | | - <img src="irondrop-logo.png" alt="IronDrop Logo" width="120"/> |
| 4 | + <img src="irondrop-logo.png" alt="IronDrop Logo" width="150"/> |
| 5 | + |
| 6 | + <h1>IronDrop: The Zero-Dependency, High-Performance File Server</h1> |
| 7 | + |
| 8 | + <p> |
| 9 | + <strong>Drop files, not dependencies.</strong> IronDrop is a blazing-fast, secure, and feature-rich file server written in pure Rust, delivered as a single, portable binary. |
| 10 | + </p> |
5 | 11 |
|
6 | 12 | [](https://github.com/dev-harsh1998/IronDrop/actions/workflows/rust.yml) |
7 | 13 | </div> |
8 | 14 |
|
9 | | -A lightweight, high-performance file server written in Rust with **zero external dependencies**. Production-ready with comprehensive upload functionality, dual-mode search engine, and enterprise-grade security. |
| 15 | +IronDrop is not just another file server. It's a production-ready toolkit designed for performance, security, and ease of use. Whether you're sharing files on your local network, setting up a lightweight digital archive, or need a robust upload endpoint, IronDrop provides a complete solution with zero external dependencies. |
| 16 | + |
| 17 | +## ⭐ Why Choose IronDrop? |
| 18 | + |
| 19 | +IronDrop was built to address the limitations of other open-source file servers. Here’s how it stands out: |
| 20 | + |
| 21 | +| Feature | IronDrop | `python -m http.server` | `npx http-server` | Other Rust Servers (`miniserve`) | |
| 22 | +| :--- | :---: | :---: | :---: | :---: | |
| 23 | +| **Zero Dependencies** | ✅ | ❌ (Python) | ❌ (Node.js) | ✅ | |
| 24 | +| **File Uploads** | ✅ | ❌ | ❌ | ✅ | |
| 25 | +| **Advanced Search** | ✅ | ❌ | ❌ | ❌ | |
| 26 | +| **Real-time Monitoring** | ✅ | ❌ | ❌ | ❌ | |
| 27 | +| **Enterprise-Grade Security**| ✅ | ❌ | ❌ | ❌ | |
| 28 | +| **Low Memory Usage** | ✅ | ❌ | ❌ | ✅ | |
| 29 | +| **Single Binary** | ✅ | ❌ | ❌ | ✅ | |
| 30 | + |
| 31 | +## 🚀 Key Features |
| 32 | + |
| 33 | +* **🚀 High-Performance File Serving:** Serve files with support for range requests, MIME type detection, and conditional caching headers. |
| 34 | +* **⬆️ Modern File Uploads:** A beautiful drag-and-drop interface for uploading files and entire folders. Supports files up to 10GB. |
| 35 | +* **🧠 Advanced Dual-Mode Search:** A powerful search engine that automatically switches between a standard, full-featured engine and an "ultra-compact" mode for directories with millions of files. |
| 36 | +* **📊 Real-time Monitoring:** A built-in monitoring dashboard at `/monitor` provides live statistics on requests, uploads, and server health, with a JSON API for integration. |
| 37 | +* **🔒 Enterprise-Grade Security:** IronDrop is built with a security-first mindset, featuring: |
| 38 | + * Rate limiting and connection management to prevent DoS attacks. |
| 39 | + * Optional Basic Authentication. |
| 40 | + * Path traversal protection and filename sanitization. |
| 41 | + * Comprehensive OWASP compliance. |
| 42 | +* **🖥️ Professional UI:** A modern, responsive, dark-themed interface that's a pleasure to use. |
| 43 | +* **📦 Zero Dependencies, Single Binary:** The entire application, including all assets, is compiled into a single, portable executable. No runtimes, no interpreters, no hassle. |
| 44 | + |
| 45 | +## ⚡ Performance |
| 46 | + |
| 47 | +IronDrop is engineered for extreme performance and memory efficiency. |
| 48 | + |
| 49 | +### Ultra-Compact Search Engine |
10 | 50 |
|
11 | | -## 🚀 Features |
| 51 | +The standout feature is the **ultra-compact search engine**, which can index over **10 million files using less than 100MB of RAM**. |
12 | 52 |
|
13 | | -• **File Downloads** - Secure file serving with range requests and MIME detection |
14 | | -• **File Uploads** - Drag-and-drop interface supporting up to 10GB files |
15 | | -• **Advanced Search** - Dual-mode search engine optimized for directories of any size |
16 | | -• **Professional UI** - Modern blackish-grey interface with responsive design |
17 | | -• **Security Built-in** - Rate limiting, authentication, path traversal protection |
18 | | -• **Real-time Monitoring** - Live dashboard at `/monitor` with JSON API |
19 | | -• **Zero Dependencies** - Pure Rust implementation, single binary deployment |
| 53 | +| Directory Size | Search Time | Memory Usage | |
| 54 | +| :--- | :--- | :--- | |
| 55 | +| 100K files | 5-15ms | ~1.1MB | |
| 56 | +| 1M files | 20-80ms | ~11MB | |
| 57 | +| **10M files** | **100-500ms** | **~110MB** | |
| 58 | + |
| 59 | +This makes IronDrop the ideal choice for serving large archives, datasets, and media collections without sacrificing performance. |
| 60 | + |
| 61 | +## 🛡️ Security |
| 62 | + |
| 63 | +Security is a core design principle of IronDrop. |
| 64 | + |
| 65 | +* **OWASP Top 10 Compliant:** The server is designed to mitigate the most critical web application security risks. |
| 66 | +* **Comprehensive Input Validation:** All inputs, from CLI arguments to HTTP headers and filenames, are rigorously validated. |
| 67 | +* **Secure by Default:** Features like uploads and authentication are opt-in, ensuring a secure default configuration. |
| 68 | +* **Extensive Security Documentation:** For a detailed breakdown of security features, see the [RFC & OWASP Compliance](./doc/RFC_OWASP_COMPLIANCE.md) and [Security Fixes](./doc/SECURITY_FIXES.md) documents. |
20 | 69 |
|
21 | 70 | ## 📦 Installation |
22 | 71 |
|
23 | | -### Quick Start |
| 72 | +Getting started with IronDrop is simple. |
| 73 | + |
| 74 | +### From Source |
| 75 | + |
24 | 76 | ```bash |
25 | | -# Clone and build |
| 77 | +# Clone the repository |
26 | 78 | git clone https://github.com/dev-harsh1998/IronDrop.git |
27 | 79 | cd IronDrop |
| 80 | + |
| 81 | +# Build the release binary |
28 | 82 | cargo build --release |
29 | 83 |
|
30 | | -# Run server |
31 | | -./target/release/irondrop -d /path/to/files |
| 84 | +# The executable will be in ./target/release/irondrop |
32 | 85 | ``` |
33 | 86 |
|
34 | | -### System Installation (Optional) |
| 87 | +### System-Wide Installation |
35 | 88 |
|
36 | | -Make `irondrop` available system-wide: |
37 | | - |
38 | | -**Linux/macOS:** |
39 | 89 | ```bash |
40 | | -# Copy to system PATH |
| 90 | +# For Linux/macOS |
41 | 91 | sudo cp ./target/release/irondrop /usr/local/bin/ |
42 | 92 |
|
43 | | -# Or user-local installation |
44 | | -mkdir -p ~/.local/bin |
45 | | -cp ./target/release/irondrop ~/.local/bin/ |
46 | | -# Add ~/.local/bin to PATH in ~/.bashrc or ~/.zshrc |
47 | | -export PATH="$HOME/.local/bin:$PATH" |
| 93 | +# For Windows (in PowerShell) |
| 94 | +mkdir "C:\ Program Files\IronDrop" |
| 95 | +copy ".\target\release\irondrop.exe" "C:\ Program Files\IronDrop\" |
| 96 | +# Then add C:\ Program Files\IronDrop to your system's PATH |
48 | 97 | ``` |
49 | 98 |
|
50 | | -**Windows:** |
51 | | -```powershell |
52 | | -# Copy to a directory in PATH, or create one |
53 | | -mkdir "C:\Program Files\IronDrop" |
54 | | -copy ".\target\release\irondrop.exe" "C:\Program Files\IronDrop\" |
55 | | -# Add C:\Program Files\IronDrop to system PATH via Environment Variables |
56 | | -``` |
| 99 | +## ⚙️ Usage |
57 | 100 |
|
58 | | -### Basic Usage |
59 | 101 | ```bash |
60 | | -# Serve current directory |
| 102 | +# Serve the current directory |
61 | 103 | irondrop -d . |
62 | 104 |
|
63 | 105 | # Enable uploads with authentication |
64 | | -irondrop -d . --enable-upload --username admin --password secret |
| 106 | +irondrop -d . --enable-upload --username admin --password your-secret-password |
65 | 107 |
|
66 | | -# Custom port and network interface |
67 | | -irondrop -d ./files --listen 0.0.0.0 --port 3000 |
| 108 | +# Serve on a different port and listen on all interfaces |
| 109 | +irondrop -d /path/to/your/files --port 3000 --listen 0.0.0.0 |
68 | 110 | ``` |
69 | 111 |
|
| 112 | +For a full list of options, run `irondrop --help`. |
| 113 | +
|
| 114 | +## 📚 Documentation |
| 115 | +
|
| 116 | +IronDrop has extensive documentation covering its architecture, API, and features. |
| 117 | +
|
| 118 | +* [**Complete Documentation Index**](./doc/README.md) |
| 119 | +* [**Architecture Guide**](./doc/ARCHITECTURE.md) |
| 120 | +* [**API Reference**](./doc/API_REFERENCE.md) |
| 121 | +* [**Deployment Guide**](./doc/DEPLOYMENT.md) |
| 122 | +* [**Search Feature Deep Dive**](./doc/SEARCH_FEATURE.md) |
| 123 | +
|
70 | 124 | ## 🧪 Testing |
71 | 125 |
|
| 126 | +IronDrop is rigorously tested with over 100 tests. |
| 127 | +
|
72 | 128 | ```bash |
73 | 129 | # Run all tests |
74 | 130 | cargo test |
75 | 131 |
|
76 | | -# Run with output |
| 132 | +# Run tests with output |
77 | 133 | cargo test -- --nocapture |
78 | | - |
79 | | -# Format and lint |
80 | | -cargo fmt && cargo clippy |
81 | 134 | ``` |
82 | 135 |
|
83 | | -## 📋 Current Version |
84 | | - |
85 | | -**v2.5.0** - Latest stable release with advanced search system, comprehensive file upload functionality, and monitoring dashboard |
86 | | - |
87 | | -## 📖 Documentation |
88 | | - |
89 | | -For comprehensive documentation, deployment guides, and API reference: |
90 | | - |
91 | | -**[📚 Complete Documentation](./doc/README.md)** |
92 | | - |
93 | | -### Quick Links |
94 | | -• [🏗️ Architecture Guide](./doc/ARCHITECTURE.md) - System design and components |
95 | | -• [🔌 API Reference](./doc/API_REFERENCE.md) - REST endpoints and examples |
96 | | -• [🔍 Search System](./doc/SEARCH_FEATURE.md) - Dual-mode search implementation |
97 | | -• [🚀 Deployment Guide](./doc/DEPLOYMENT.md) - Production setup and Docker |
98 | | -• [🔒 Security Guide](./doc/SECURITY_FIXES.md) - Security features and best practices |
99 | | - |
100 | | -## 🌟 Why IronDrop? |
101 | | - |
102 | | -• **Zero Config** - Works out of the box with sensible defaults |
103 | | -• **Production Ready** - 101+ tests, comprehensive security, monitoring built-in |
104 | | -• **Memory Efficient** - <100MB for 10M+ files with ultra-compact search |
105 | | -• **Developer Friendly** - Clear architecture, extensive documentation |
106 | | - |
107 | 136 | ## 📜 License |
108 | 137 |
|
109 | | -GPL-3.0 License - see [LICENSE](LICENSE) for details. |
| 138 | +IronDrop is licensed under the [GPL-3.0 License](./LICENSE). |
110 | 139 |
|
111 | 140 | --- |
112 | 141 |
|
113 | 142 | <div align="center"> |
114 | | - |
115 | | -*Made with 🦀 in Rust* |
116 | | - |
117 | | -**[⭐ Star us on GitHub](https://github.com/dev-harsh1998/IronDrop) • [📖 Documentation](./doc/) • [🐛 Issues](https://github.com/dev-harsh1998/IronDrop/issues)** |
118 | | - |
119 | | -</div> |
| 143 | + <p> |
| 144 | + <strong>Made with ❤️ and 🦀 in Rust</strong> |
| 145 | + </p> |
| 146 | + <p> |
| 147 | + <a href="https://github.com/dev-harsh1998/IronDrop">⭐ Star us on GitHub</a> |
| 148 | + • |
| 149 | + <a href="https://github.com/dev-harsh1998/IronDrop/issues">Report an Issue</a> |
| 150 | + • |
| 151 | + <a href="./doc/README.md">Read the Docs</a> |
| 152 | + </p> |
| 153 | +</div> |
0 commit comments