Skip to content

Development & Build

hubproxy/
├── src/ # Go backend
├── web/ # Vue SPA
├── Dockerfile
└── docs/

Edit githubExps in src/handlers/github.go:

var githubExps = []*regexp.Regexp{
regexp.MustCompile(`^(?:https?://)?github\.com/([^/]+)/([^/]+)/(?:releases|archive)/.*`),
// add new patterns here
}

Requirements:

  1. Include ([^/]+)/([^/]+) capture groups for [access] owner/repo matching
  2. Run go test ./handlers/...
  3. Routes use NoRoute(GitHubProxyHandler) in main.go — no new route needed

Access control: src/utils/access_control.goCheckGitHubAccess.

config.toml[registries]. Auth hook: createUpstreamOptions() in src/handlers/docker.go.

Register in buildRouter() in src/main.go.

Terminal window
cd src && CONFIG_PATH=./config.toml go run .
cd web && npm ci && npm run dev

Production embed:

Terminal window
cd web && npm ci && npm run build
# copy dist to src/dist
cd ../src && go build -o hubproxy .
Terminal window
docker build -t hubproxy:local --build-arg VERSION=1.0.0 .
docker buildx build --platform linux/amd64,linux/arm64 \
-t ghcr.io/your-org/hubproxy:latest \
--build-arg VERSION=1.0.0 --push .
Stage Image Role
frontend node:24-alpine Vue build
builder golang:1.26-alpine Go + UPX
final alpine Runtime
Terminal window
cd src && go test ./...

CI: .github/workflows/docker-ghcr.yml, release.yml.