d
D is a simple standalone httpd with modern features.
Features
- 📁 Directory listing with rich file type icons and sorting
- 🎨 Syntax highlighting for code files
- 🖼️ File preview for images, videos, audio, markdown and code
- 📥 Download/Raw/Preview options for text files
- 🔍 Breadcrumb navigation with clickable paths
- 📊 Multiple sort options (name, size, time, type)
- 👁️ Hidden files toggle (configurable)
- 🗜️ Compression support (gzip, deflate, brotli)
- 🌐 CORS support
- 📡 Range requests for resumable downloads
- 🏷️ ETag and cache control
- 🖥️ Graceful shutdown
Usage
Install
# or
Run
# Basic usage
# Custom port
# Custom root directory
# Show hidden files (allows users to toggle)
# Full options
Options
| Option | Description | Default |
|---|---|---|
-H, --host |
Listening host | localhost |
-p, --port |
Listening port | 8080 |
-r, --root |
Root directory to serve | . |
-l, --log |
Log level | info |
--hidden |
Allow showing hidden files | disabled |
Environment Variables
D_HOST- Server hostD_PORT- Server portD_ROOT- Root directoryRUST_LOG- Log level
Web Interface
When accessing a directory, you can use query parameters:
?sort=name- Sort by name (default)?sort=size- Sort by file size?sort=time- Sort by modification time?sort=type- Sort by file type?hidden=true- Show hidden files
License
This project is licensed under the One Public License (1PL).