Skip to content

GitHub Acceleration

Requests that do not match /v2, /token, /api, or other registered routes are handled by the GitHub proxy. Prefix the full original URL with your HubProxy host; if the URL matches a supported pattern, the handler reconstructs it and proxies to GitHub, Hugging Face, or other upstreams — otherwise it returns “invalid input”.

Prefix your original URL with the HubProxy host. Two formats are supported.

Terminal window
# Release download
curl -L -O "https://example.com/https://github.com/owner/repo/releases/download/v1.0.0/app.tar.gz"
# Git clone
git clone https://example.com/https://github.com/owner/repo.git
# API
curl "https://example.com/https://api.github.com/repos/owner/repo/releases/latest"

Use url.<base>.insteadOf so every https://github.com/ clone/fetch goes through HubProxy automatically:

Terminal window
git config --global url."https://example.com/https://github.com/".insteadOf "https://github.com/"

Then clone as usual:

Terminal window
git clone https://github.com/owner/repo.git
# actually requests https://example.com/https://github.com/owner/repo.git

To remove:

Terminal window
git config --global --unset url.https://example.com/https://github.com/.insteadOf

HubProxy auto-prepends the scheme:

Terminal window
curl -L -O "https://example.com/github.com/owner/repo/releases/download/v1.0.0/app.tar.gz"
Type Path pattern
Release / Archive github.com/{owner}/{repo}/releases/..., /archive/...
Raw / Blob github.com/{owner}/{repo}/raw/... (/blob/ auto-converted to /raw/)
Git protocol github.com/{owner}/{repo}/info/..., /git-...
Raw domains raw.githubusercontent.com/..., raw.github.com/...
API api.github.com/repos/{owner}/{repo}/...
Gist gist.github.com/..., gist.githubusercontent.com/...
Hugging Face huggingface.co/..., cdn-lfs.hf.co/...
GitHub Assets github.githubassets.com/..., opengraph.githubassets.com/...

HubProxy can rewrite GitHub URLs inside .sh / .ps1 install scripts (max 10MB). Behind a reverse proxy, set X-Forwarded-Host correctly — see Reverse Proxy.

Limit Description
Web content text/html, application/xml, etc. are blocked (403) — not for browsing GitHub pages
File size [server].fileSize caps single-file downloads (default 2GB)
Repo access [access].whiteList / blackList restrict proxied GitHub repos and Hugging Face resources

Large Release files support wget -c resume — see Transfer Capabilities.

[server]
fileSize = 2147483648
[access]
whiteList = ["trusted-org/*"]
blackList = ["*/malicious-repo"]