How sigoden/dufs works
Main Components
a) Core Server Components:
• HTTP Server (based on src/server.rs)
• Authentication System (src/auth.rs)
• File System Interface
• WebDAV Interface
• HTTP Logger (src/http_logger.rs)
b) Frontend Components:
• Static Asset Server
• Web UI (assets/index.html, assets/index.js, assets/index.css)
c) External Interfaces:
• REST API Endpoints
• WebDAV Protocol Support
• File System Access
┌─────────────────────────────────────────────┐
• Client Layer │
• (Web Browsers, cURL, WebDAV Clients) │
• ┘
• ↕ HTTP/HTTPS
┌─────────────────────────────────────────────┐
• Transport Layer │
• (TLS, CORS, Authentication, Logging) │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• Server Core │
• ┬─────────────┬────────────────┤
• Static │ WebDAV │ File System │
• Server │ Handler │ Operations │
• ┴─────────────┴────────────────┘
• ↕
┌─────────────────────────────────────────────┐
• Storage Layer │
• (Local File System, Symlinks) │
• ┘
Key Interactions to Highlight
a) Authentication Flow:
• How auth rules (user:pass@/dir:rw) are processed
• Both Basic and Digest auth support
b) File Operations:
• Upload/Download paths
• Directory listing
• Search functionality
• ZIP archive creation
c) WebDAV Integration:
• MOVE, MKCOL, DELETE operations
• WebDAV client connections
Special Features
• Path prefix handling
• Hidden file filtering
• Compression options
• Custom asset serving
• Health check endpoint
Configuration Elements
Configuration sources:
• CLI arguments
• Environment variables
• YAML config file
• Default settings
Specific Implementation Details
• The modular Rust implementation (show main module relationships)
• The separation between core server logic and protocol handlers
• The extensible nature of the authentication system
• The flexible logging system