How sky22333/hubproxy works
HubProxy is a self-hosted Go proxy for container registries and GitHub, with a Vue interface for image search, tag browsing, and offline image downloads. A typical user searches for an image, browses its tags, then requests a downloadable image archive; Docker and GitHub clients also use the service directly as a proxy. The sampled router and handlers establish the main server flow. README capabilities such as Hugging Face acceleration are retained, but their internal wiring was not sampled.
Main entry points: main.go HTTP server · index.ts Page router · search.go Search and tags · api.ts Browser API client
Components 19
Server and configuration
- HTTP server
src/main.go - Configuration
src/config/config.go
Proxy services
- Registry proxy
src/handlers/docker.go - GitHub and HF proxy
src/handlers/github.go
Image discovery and downloads
- Search and tags
src/handlers/search.go - Image archive downloads
src/handlers/imagetar.go
Web interface
- Embedded SPA routes
src/main.go - Vue application shell
web/src/App.vue - Page router
web/src/router/index.ts - Search page
web/src/pages/SearchPage.vue - Offline images page
web/src/pages/ImagesPage.vue - GitHub acceleration page
web/src/pages/HomePage.vue - Browser API client
web/src/api.ts
Access and networking
- Rate limiting and IP policy
src/utils/ratelimiter.go - Outbound HTTP clients
src/utils/http_client.go
Other components
- User or client
- Container registries
- GitHub and Hugging Face
- Docker Hub API
Connections 21
- User or client → HTTP server: sends requests
README.md - HTTP server → Configuration: loads settings
src/main.go - HTTP server → Rate limiting and IP policy: installs middleware
src/main.go - HTTP server → Registry proxy: routes registry traffic
src/main.go - HTTP server → GitHub and HF proxy: routes fallback traffic
src/main.go - HTTP server → Image archive downloads: registers download routes
src/main.go - HTTP server → Search and tags: registers search route
src/main.go - HTTP server → Embedded SPA routes: serves SPA routes
src/main.go - Registry proxy → Container registries: proxies registry requests
README.md - GitHub and HF proxy → GitHub and Hugging Face: accelerates file requests
README.md - Search and tags → Outbound HTTP clients: requests via client
src/handlers/search.go - Search and tags → Docker Hub API: fetches search and tags
src/handlers/search.go - Image archive downloads → Container registries: streams image content
src/handlers/imagetar.go - HTTP server → Vue application shell: serves embedded app
src/main.go - Vue application shell → Page router: renders routed view
web/src/App.vue - Page router → Search page: routes search page
web/src/router/index.ts - Page router → Offline images page: routes download page
web/src/router/index.ts - Page router → GitHub acceleration page: routes acceleration page
web/src/router/index.ts - Search page → Browser API client: calls search and tags
web/src/pages/SearchPage.vue - Browser API client → Search and tags: requests search API
- Browser API client → Image archive downloads: requests download API