How minpeter/iplogger works
Main Components
a) Web Service Layer
• HTTP Server (Go-based)
• Template Engine (using .gohtml files)
• Request Handler (main.go)
b) Core Logic Modules
• IP Detection Module (pkg/ip)
• User Agent Parser (pkg/useragent)
c) External Interfaces
• Reverse Proxy Layer(s)
• Client Browsers/Curl Clients
[Client Layer]
• ↓ HTTP/HTTPS
[Reverse Proxy Layer(s)]
• ↓ Forwarded Headers
[Application Layer]
• Web Server (main.go)
• Template Engine
• index.gohtml
• detail.gohtml
• Core Modules
• IP Detection
• UserAgent Parser
Implementation Details to Highlight
• Docker containerization (show container boundary)
• Port mapping (10000:10000)
• Template rendering flow
• IP detection logic flow
Top Section:
• External clients (browsers, curl)
• Reverse proxy layers
Middle Section:
• Main application container
• Web server component
Bottom Section:
• Core logic modules
• Template engine
Additional Elements
• Notes about key configuration points
• Environment boundaries (container vs. host)
• Logging points
The containerized nature of the deployment
Keep the focus on the IP detection and logging aspects while maintaining enough detail to show how the service handles various proxy configurations. This is crucial for understanding how the service achieves its primary purpose of accurate client IP logging behind reverse proxies.
Remember to include version information and any relevant environment variables or configuration options that affect the IP logging behavior.