How mbrubeck/agate works
Main Components Identification
The system should be represented with these key components:
a) Server Core
• TLS Handler (supports TLS 1.2 and 1.3)
• Request Handler
• Virtual Host Manager
• Certificate Manager
b) File System Interface
• Static Content Server
• Directory Listing Handler
• Meta Configuration Parser
c) Security Layer
• Certificate Generation/Management
• Access Control
[Client Layer]
• ↓
[TLS/Security Layer]
• ↓
[Server Core Layer]
• ↓
[File System Layer]
Component Relationships
[Gemini Client] → [TLS Handler]
• ↓
[Certificate Manager] ← [Virtual Host Manager] → [Request Handler]
• ↓
• [Meta Config Parser] ← [Static Content Server]
• ↓
• [File System Interface]
Important Details
a) Input/Output flows:
• Gemini requests (gemini://) coming from clients
• File system paths for content serving
• Certificate/key paths (.certificates directory)
• Configuration files (.meta)
b) Key Features:
• Virtual hosting support
• Directory listing capability
• Meta-configuration system
• Automatic certificate generation
Technical Specifications
Technical details:
• Port: 1965 (standard Gemini port)
• Supported TLS versions: 1.2, 1.3
• File formats: .gmi (Gemini), .der (certificates)
• Configuration files: .meta, .directory-listing-ok
Implementation Notes
Notes about:
• Rust async runtime usage
• Static file serving optimization
• Certificate loading and caching
• Language-specific content negotiation
Remember to maintain a balance between showing the high-level architecture and including important implementation details that affect the system's behavior, such as the certificate management system and virtual hosting capabilities.