Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Cargo.lock
.copilot
*.DS_Store
.direnv
*.log
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "irondrop"
version = "2.6.5"
version = "2.7.0"
edition = "2024"
license = "MIT"
description = "Drop files, not dependencies - a well tested fully featured & battle-ready server in a single Rust binary with support for indexing through 10M files."
Expand Down
60 changes: 47 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,35 @@ IronDrop focuses on predictable behavior, simplicity, and low overhead. Use it t
- Basic security features: rate limiting, optional Basic Auth, path safety checks
- Native SSL/TLS support via `--ssl-cert` and `--ssl-key` (built-in HTTPS, no reverse proxy required)
- Single binary; templates and assets are embedded
- Pure standard library networking and file I/O (no external HTTP stack or async runtime)
- Ultra-compact search index option for very large directory trees (tested up to ~10M entries)
- Core engine is dependency-free in critical paths: networking, search, and filesystem access are implemented in-house
- Standard production dependencies are still used where practical (for example `clap`, `log`/`env_logger`, and `rustls`)
- Ultra-compact search index option for very large directory trees (tested up to ~10M entries)
- WebDAV (RFC 4918 Class 1 + Class 2 core): `OPTIONS`, `PROPFIND`, `PROPPATCH`, `MKCOL`, `PUT`, `DELETE`, `COPY`, `MOVE`, `LOCK`, `UNLOCK`
- Enabled only when `--enable-webdav true` (or equivalent config setting) is provided

## WebDAV RFC 4918 support

IronDrop includes an RFC 4918-focused implementation. The WebDAV core engine is implemented in-house and keeps critical request/response logic dependency-free.

- Supported methods: `OPTIONS`, `PROPFIND`, `PROPPATCH`, `MKCOL`, `PUT`, `DELETE`, `COPY`, `MOVE`, `LOCK`, `UNLOCK`
- WebDAV is feature-gated and disabled by default; enable explicitly with `--enable-webdav true`
- Capability headers: `DAV: 1,2`, `Allow`, `MS-Author-Via`
- `PROPFIND`: `allprop`, `propname`, named `prop`, per-property `propstat` grouping (`200`/`404`), and finite-depth refusal (`403` + `propfind-finite-depth`)
- `PROPPATCH`: dead-property `set`/`remove` with `207 Multi-Status` results
- Locking: exclusive write locks, lock refresh, `If` header token evaluation (including `Not` conditions), and token-gated write preconditions
- Tree operations: lock-aware `DELETE` multistatus behavior (`207` with `423`/`424` where applicable)

Current RFC scope limits:

- ACL/versioning/bindings RFCs are out of scope (`RFC 3744`, `RFC 3253`, `RFC 5842`)
- Lock and dead-property storage is in-process (non-persistent across server restarts)

## Performance

Designed to keep memory usage steady and to stream large files without buffering them in memory. The ultra-compact search mode reduces memory for very large directory trees.

- Ultra-compact search: approximately ~110 MB of RAM for around 10 million paths; search latency depends on CPU, disk, and query specifics.
- No-dependency footprint: networking and file streaming are implemented with Rust's `std::net` and `std::fs`, producing a single self-contained binary.
- Dependency profile: networking/search/filesystem core paths are dependency-free, while operational dependencies such as `clap`, `log`/`env_logger`, and `rustls` are used as stable standard building blocks.

## Security

Expand Down Expand Up @@ -197,6 +217,7 @@ IronDrop offers extensive customization through command-line arguments:
| `-l, --listen` | Listen address (default: 127.0.0.1) | `-l 0.0.0.0` |
| `-p, --port` | Port number (default: 8080) | `-p 3000` |
| `--enable-upload` | Enable file uploads | `--enable-upload true` |
| `--enable-webdav` | Enable WebDAV methods (`OPTIONS`, `PROPFIND`, `PROPPATCH`, `MKCOL`, `PUT`, `DELETE`, `COPY`, `MOVE`, `LOCK`, `UNLOCK`) | `--enable-webdav true` |
| `--username/--password` | Basic authentication | `--username admin --password secret` |
| `-a, --allowed-extensions` | Restrict file types | `-a "*.pdf,*.doc,*.zip"` |
| `-t, --threads` | Worker threads (default: 8) | `-t 16` |
Expand All @@ -219,6 +240,19 @@ irondrop --config-file my-server.ini

The configuration file supports all command-line options and more! See the [detailed example](./config/irondrop.ini) with comments explaining every option.

WebDAV can also be enabled in config:

```ini
[webdav]
enable_webdav = true
```

Quick CLI example:

```bash
irondrop -d ./shared --enable-webdav true --listen 0.0.0.0
```

**Configuration Priority (highest to lowest):**
1. Command line arguments
2. Environment variables (`IRONDROP_*`)
Expand Down Expand Up @@ -273,6 +307,7 @@ IronDrop has extensive documentation covering its architecture, API, and feature

### 🔧 **Feature Documentation**
* [**Search Feature Deep Dive**](./doc/SEARCH_FEATURE.md) - Ultra-compact search system details
* [**WebDAV Implementation Guide**](./doc/WEBDAV_IMPLEMENTATION.md) - End-to-end flow and RFC 4918 behavior
* [**Upload Integration Guide**](./doc/UPLOAD_INTEGRATION.md) - File upload system and UI
* [**Direct Upload System**](./doc/MULTIPART_README.md) - Memory-efficient direct streaming architecture
* [**Configuration System**](./doc/CONFIGURATION_SYSTEM.md) - INI-based configuration guide
Expand All @@ -286,16 +321,15 @@ IronDrop has extensive documentation covering its architecture, API, and feature

## Testing

IronDrop is rigorously tested with **199 comprehensive tests across 16 test files** covering all aspects of functionality.
IronDrop is rigorously tested with **272 automated tests**:

- **48 unit tests** in core source modules
- **224 integration/system tests** across **28** test files (including WebDAV RFC suites)

### Test Categories
- **Integration Tests** (16 tests): End-to-end functionality and HTTP handling
- **Monitor Tests** (2 tests): Real-time monitoring dashboard and metrics
- **Rate Limiter Tests** (7 tests): Memory-based rate limiting and DoS protection
- **Template Tests** (8 tests): Embedded template system and rendering
- **Ultra-Compact Search Tests** (10 tests): Advanced search engine functionality
- **Configuration Tests** (12 tests): INI parsing and configuration validation
- **Core Server & Unit Tests** (40 tests): Library functions, utilities, and core logic
### Coverage Areas
- HTTP parser/request handling, auth, rate limiting, monitoring, uploads, search, and utilities
- WebDAV RFC-focused behavior (`PROPFIND`, `PROPPATCH`, `COPY/MOVE`, `LOCK/UNLOCK`, error XML, edge preconditions)
- Security and robustness paths (path traversal checks, symlink safeguards, malformed input handling)

```bash
# Run all tests
Expand All @@ -322,7 +356,7 @@ IronDrop is licensed under the [MIT License](./LICENSE).
<div align="center">
<p>
<strong>Made with ❤️ and 🦀 in Rust</strong><br>
<em>Zero dependencies • Production ready • Battle tested with 199 comprehensive tests</em>
<em>Dependency-free core engine paths • Production ready • Battle tested with 272 automated tests</em>
</p>
<p>
<a href="https://github.com/dev-harsh1998/IronDrop">⭐ Star us on GitHub</a>
Expand Down
35 changes: 27 additions & 8 deletions config/irondrop.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
# 2. Edit the settings below to match your needs
# 3. Run: irondrop --config-file my-config.ini
#
# 🔧 IronDrop v2.6+ Features:
# 🔧 IronDrop v2.7+ Features:
# • Direct streaming uploads with unlimited file size support
# • Ultra-compact search engine (10M+ files, <100MB RAM)
# • Zero-dependency single binary
# • Dependency-free core engine paths (networking/search/filesystem)
# • Enterprise-grade security
#
# ⚙️ Configuration Priority (highest to lowest):
Expand Down Expand Up @@ -111,6 +111,21 @@ enable_upload = true
# 🚀 IronDrop's advantage: Even with "unlimited", memory usage stays constant!
max_upload_size = 5GB

# ===============================================================================
# 🌐 WEBDAV CONFIGURATION
# ===============================================================================

[webdav]
# 🔗 Enable WebDAV (RFC 4918 Class 1 + Class 2 core methods)
# • false = WebDAV routes return 405 Method Not Allowed (default)
# • true = Enable WebDAV clients (Finder, mount tools, DAV sync clients)
#
# ✅ Methods enabled when true:
# OPTIONS, PROPFIND, PROPPATCH, MKCOL, PUT, DELETE, COPY, MOVE, LOCK, UNLOCK
#
# ⚠️ Recommendation: Use authentication and HTTPS when exposing WebDAV externally.
enable_webdav = false


# ===============================================================================
# 🔒 SECURITY CONFIGURATION
Expand Down Expand Up @@ -263,6 +278,9 @@ detailed = true
# [upload]
# enable_upload = true
# max_upload_size = 100MB
#
# [webdav]
# enable_webdav = true
#
# [security]
# allowed_extensions = *.pdf,*.doc,*.docx,*.xls,*.xlsx,*.ppt,*.pptx,*.zip
Expand Down Expand Up @@ -300,12 +318,13 @@ detailed = true
# ✅ 3. Choose your listen address (127.0.0.1 or 0.0.0.0)
# ✅ 4. Set a port (8080 is fine for most cases)
# ✅ 5. Enable uploads if needed (set enable_upload = true)
# ✅ 6. Add authentication for network access (set username/password)
# ✅ 7. Configure allowed file extensions for security
# ✅ 7b. (Optional) Add SSL cert and key for HTTPS
# ✅ 8. Run: irondrop --config-file my-config.ini
# ✅ 9. Open browser: http://localhost:8080 (or your chosen port)
# ✅ 10. Enjoy blazing-fast file sharing! 🚀
# ✅ 6. (Optional) Enable WebDAV if needed (set [webdav] enable_webdav = true)
# ✅ 7. Add authentication for network access (set username/password)
# ✅ 8. Configure allowed file extensions for security
# ✅ 8b. (Optional) Add SSL cert and key for HTTPS
# ✅ 9. Run: irondrop --config-file my-config.ini
# ✅ 10. Open browser: http://localhost:8080 (or your chosen port)
# ✅ 11. Enjoy blazing-fast file sharing! 🚀
#
# 📖 Need more help? Check out:
# • Complete documentation: ./doc/README.md
Expand Down
10 changes: 5 additions & 5 deletions doc/API_REFERENCE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# IronDrop API Reference v2.6.5
# IronDrop API Reference v2.7.0

## Overview

Expand Down Expand Up @@ -31,7 +31,7 @@ User-Agent: <client-identifier>
#### Response Headers
```http
# Standard headers
Server: IronDrop/2.6.5
Server: IronDrop/2.7.0
Content-Type: <mime-type>
Content-Length: <content-length>
Connection: keep-alive
Expand Down Expand Up @@ -193,7 +193,7 @@ Content-Type: text/html; charset=utf-8
#### `POST /_irondrop/upload`
Uploads files using direct binary streaming for optimal performance and unlimited file size support.

**Direct Upload Features (v2.6.5):**
**Direct Upload Features (v2.7.0):**
- **Direct Binary Streaming**: No multipart parsing overhead
- **Automatic Mode Selection**: Small uploads (≤64MB) processed in memory, large uploads (>64MB) streamed to disk
- **Constant Memory Usage**: ~7MB RAM usage regardless of file size
Expand Down Expand Up @@ -420,7 +420,7 @@ Basic health check endpoint.
```json
{
"status": "healthy",
"version": "2.6.5",
"version": "2.7.0",
"uptime_seconds": 3600,
"timestamp": "2024-01-01T12:00:00Z"
}
Expand Down Expand Up @@ -827,4 +827,4 @@ All inputs are validated:
- File names for path traversal attempts
- HTTP headers for malformed content

This API reference covers all functionality available in IronDrop v2.6.5 and provides comprehensive examples for client integration.
This API reference covers all functionality available in IronDrop v2.7.0 and provides comprehensive examples for client integration.
6 changes: 3 additions & 3 deletions doc/ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# IronDrop Architecture Documentation v2.6.5
# IronDrop Architecture Documentation v2.7.0

## Overview

Expand Down Expand Up @@ -257,7 +257,7 @@ Request → Cache Check → Hit: Return Cached Results
## HTTP Layer Streaming Architecture

### Overview
IronDrop v2.6.5 provides advanced HTTP layer streaming for efficient handling of large file uploads. The system automatically switches between memory-based and disk-based processing based on content size, providing optimal performance and resource utilization.
IronDrop v2.7.0 provides advanced HTTP layer streaming for efficient handling of large file uploads. The system automatically switches between memory-based and disk-based processing based on content size, providing optimal performance and resource utilization.

### RequestBody Architecture

Expand Down Expand Up @@ -577,4 +577,4 @@ pub enum AppError {
4. **CDN Integration**: Edge caching and global distribution
5. **Database Caching**: Redis integration for session management

This architecture documentation reflects the current state of IronDrop v2.6.5 and serves as a foundation for understanding the system's design principles, implementation details, and operational characteristics.
This architecture documentation reflects the current state of IronDrop v2.7.0 and serves as a foundation for understanding the system's design principles, implementation details, and operational characteristics.
2 changes: 1 addition & 1 deletion doc/CONFIGURATION_SYSTEM.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## IronDrop Configuration System (v2.6.5)
## IronDrop Configuration System (v2.7.0)

### Overview
IronDrop 2.5 introduces a first‑class configuration system with hierarchical precedence and zero external dependencies. It complements (not replaces) the existing CLI flags, enabling reproducible deployments, easier automation, and environment portability. The system is intentionally simple: an internal INI parser (`src/config/ini_parser.rs`) plus a composition layer (`src/config/mod.rs`) that merges values from multiple sources.
Expand Down
4 changes: 2 additions & 2 deletions doc/DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# IronDrop Deployment Guide v2.6.5
# IronDrop Deployment Guide v2.7.0

## Overview

Expand Down Expand Up @@ -789,4 +789,4 @@ perf record -g irondrop -d /srv/files
strace -p $(pgrep irondrop)
```

This deployment guide provides comprehensive coverage of production deployment scenarios and operational best practices for IronDrop v2.6.5.
This deployment guide provides comprehensive coverage of production deployment scenarios and operational best practices for IronDrop v2.7.0.
6 changes: 3 additions & 3 deletions doc/HTTP_STREAMING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# IronDrop Direct Upload Streaming (v2.6.5)
# IronDrop Direct Upload Streaming (v2.7.0)

## Overview

IronDrop implements direct streaming uploads. Large request bodies are streamed to disk, avoiding unbounded memory growth. Small bodies are processed in memory.

**Status**: Production-ready (v2.6.5)
**Status**: Production-ready (v2.7.0)
- Direct streaming implementation with bounded memory usage
- Handling from small to very large files
- Tests cover stability and cleanup
Expand Down Expand Up @@ -310,7 +310,7 @@ The streaming system integrates with IronDrop's monitoring:

## Version History

- **v2.6.5**: Direct streaming implementation with unlimited file size support
- **v2.7.0**: Direct streaming implementation with unlimited file size support
- Automatic memory/disk switching based on content size
- `RequestBody` enum with `Memory` and `File` variants
- Comprehensive test coverage with dedicated streaming tests
Expand Down
4 changes: 2 additions & 2 deletions doc/MONITORING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# IronDrop Monitoring Guide (v2.6.5)
# IronDrop Monitoring Guide (v2.7.0)

This guide documents the built-in monitoring capabilities introduced with the `/monitor` endpoint and supporting health APIs.

Expand Down Expand Up @@ -125,4 +125,4 @@ done
Monitoring schema may evolve with additive fields. Consumers should ignore unknown keys. Breaking changes (renames/removals) will bump minor version >= 2.x.

---
*Monitoring Guide for IronDrop v2.6.5*
*Monitoring Guide for IronDrop v2.7.0*
4 changes: 2 additions & 2 deletions doc/MULTIPART_README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# IronDrop Direct Upload System v2.6.5
# IronDrop Direct Upload System v2.7.0

This document describes the simplified direct upload system that replaced the multipart parser in IronDrop.

## Overview

IronDrop replaces legacy multipart parsing with a direct binary upload system focused on predictable memory use and simpler processing. The system handles raw binary uploads with bounded memory. (v2.6.5)
IronDrop replaces legacy multipart parsing with a direct binary upload system focused on predictable memory use and simpler processing. The system handles raw binary uploads with bounded memory. (v2.7.0)

**Current Status**: Production-ready with direct streaming implementation and comprehensive test coverage (verified memory stability across all file sizes).

Expand Down
Loading
Loading