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”.
How to Accelerate
Section titled “How to Accelerate”Prefix your original URL with the HubProxy host. Two formats are supported.
Full URL (Recommended)
Section titled “Full URL (Recommended)”# Release downloadcurl -L -O "https://example.com/https://github.com/owner/repo/releases/download/v1.0.0/app.tar.gz"
# Git clonegit clone https://example.com/https://github.com/owner/repo.git
# APIcurl "https://example.com/https://api.github.com/repos/owner/repo/releases/latest"Global Git acceleration
Section titled “Global Git acceleration”Use url.<base>.insteadOf so every https://github.com/ clone/fetch goes through HubProxy automatically:
git config --global url."https://example.com/https://github.com/".insteadOf "https://github.com/"Then clone as usual:
git clone https://github.com/owner/repo.git# actually requests https://example.com/https://github.com/owner/repo.gitTo remove:
git config --global --unset url.https://example.com/https://github.com/.insteadOfOmit https://
Section titled “Omit https://”HubProxy auto-prepends the scheme:
curl -L -O "https://example.com/github.com/owner/repo/releases/download/v1.0.0/app.tar.gz"Supported URL Types
Section titled “Supported URL Types”| 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/... |
Script Nesting
Section titled “Script Nesting”HubProxy can rewrite GitHub URLs inside .sh / .ps1 install scripts (max 10MB). Behind a reverse proxy, set X-Forwarded-Host correctly — see Reverse Proxy.
Limits and Blocks
Section titled “Limits and Blocks”| 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"]