How yusing/godoxy works
GoDoxy is a reverse proxy with a WebUI for configuring and operating HTTP and TCP/UDP routes. The main lifecycle loads configuration, discovers route inputs, activates routes and listeners, then serves and manages traffic; changes are watched and applied at runtime. Documented branches include authentication, certificates, access control, Docker and Proxmox management, idle sleep, health, metrics, and homepage integrations. Several subsystem implementations were not sampled, so those capabilities and links are based on README documentation rather than inspected call paths.
Main entry points: handler.go WebUI API · provider Route Providers · entrypoint Listeners and Routes · runtime_manager.go Runtime Manager
Components 23
Runtime and Configuration
- Server Startup
cmd/main.go - Runtime Manager
internal/config/runtime_manager.go - Change Watchers
internal/watcher
Routing and Traffic
- Route Providers
internal/route/provider - Route Updates
internal/route/provider/event_handler.go - Route Construction
internal/route - Listeners and Routes
internal/entrypoint - HTTP and Stream Proxy
internal/routeimpl - HTTP Middleware
internal/net/gphttp/middleware - Load Balancing
internal/net/gphttp/loadbalancer
Management API
- WebUI API
internal/api/handler.go - Authentication
internal/auth - WebUI Configuration
internal/config/webui_prod.go
Providers and Integrations
- Docker Discovery
internal/docker - Remote Agent
agent/cmd/main.go - Proxmox Management
internal/proxmox - Certificate Providers
internal/autocert
Operations
- Idle Sleep
internal/idlewatcher/watcher.go - Health Monitoring
internal/health - Metrics
internal/metrics - Access Rules and Logs
internal/acl - Homepage Integrations
internal/homepage
Other components
- Operator
Connections 24
- Operator → WebUI API: manages
- Server Startup → Runtime Manager: loads runtime
cmd/main.go - Server Startup → WebUI API: registers handlers
cmd/main.go - Runtime Manager → Metrics: starts pollers
internal/config/runtime_manager.go - Runtime Manager → Route Providers: activates providers
- Change Watchers → Route Updates: sends changes
internal/route/provider/event_handler.go - Route Updates → Route Providers: reloads routes
internal/route/provider/event_handler.go - Route Updates → Route Construction: starts routes
internal/route/provider/event_handler.go - Route Construction → Listeners and Routes: registers routes
- Listeners and Routes → HTTP and Stream Proxy: dispatches traffic
- HTTP and Stream Proxy → HTTP Middleware: applies middleware
- HTTP and Stream Proxy → Load Balancing: balances requests
- WebUI API → Authentication: checks identity
internal/api/handler.go - WebUI API → WebUI Configuration: serves configuration
- Route Providers → Docker Discovery: discovers containers
- Route Providers → Remote Agent: discovers remote hosts
- Route Providers → Proxmox Management: binds resources
internal/route/provider/event_handler.go - Listeners and Routes → Certificate Providers: uses certificates
- Idle Sleep → Docker Discovery: wakes containers
internal/idlewatcher/watcher.go - Idle Sleep → Proxmox Management: wakes containers
- Listeners and Routes → Health Monitoring: checks upstreams
internal/entrypoint/query.go - WebUI API → Metrics: exposes metrics
- HTTP Middleware → Access Rules and Logs: enforces access
- WebUI API → Homepage Integrations: serves homepage data