Config example:
dir: _data
server:
pypi:
pypi.org: https://pypi.org/simple
rubygems:
rubygems.org: https://rubygems.org
galaxy:
ansible:
url: https://galaxy.ansible.com
test:
dir: _galaxy
static:
github: https://github.com
k8s: https://dl.k8s.io
get_helm: https://get.helm.sh
goproxy:
golang: https://proxy.golang.orgAccess cached PyPI packages:
http://localhost:6587/pypi/pypi.org/simple/{package}/
Access cached Galaxy collections:
http://localhost:6587/galaxy/ansible/api/v3/collections/{namespace}/{name}/
Use HUB as a RubyGems/Bundler source:
http://localhost:6587/rubygems/{repo_name}
Bundler/RubyGems clients fetch a set of plain HTTP resources. HUB proxies and caches any path under the configured upstream (wildcard route), including common endpoints:
- Compact index:
/names,/versions,/info/<gem> - Legacy indexes:
/specs.4.8.gz,/latest_specs.4.8.gz,/prerelease_specs.4.8.gz,/quick/Marshal.4.8/*.gemspec.rz - Gem artifacts:
/gems/<name>-<version>.gem
Bundler mirror example:
# all requests to rubygems.org must be forwarded to localhost:6587/rubygems/rubygems
bundle config --local mirror.https://rubygems.org http://localhost:6587/rubygems/rubygemsGemfile source example:
# by default all requests will be forwarded to proxy
source "http://localhost:6587/rubygems/rubygems"
gem "puma"
# but for rack gem it will use some other upstream
source "https://rubygems.org" do
gem "rack"
end
Access cached static files:
http://localhost:6587/static/{key}/get/{path}
To use HUB as a Go module proxy, set the GOPROXY environment variable:
export GOPROXY=http://localhost:6587/goproxy/golangOr configure it for a specific project:
go env -w GOPROXY=http://localhost:6587/goproxy/golangThe proxy supports all standard GOPROXY protocol endpoints:
/{module}/@v/list- list of available versions/{module}/@v/{version}.info- version metadata (JSON)/{module}/@v/{version}.mod- go.mod file for the version/{module}/@v/{version}.zip- source code archive/{module}/@latest- latest version info