explaingit

hunshcn/gh-proxy

8,749PythonAudience · ops devopsComplexity · 3/5Setup · moderate

TLDR

gh-proxy is a self-hosted relay server that speeds up GitHub downloads for users in regions with slow or blocked access, prepend your proxy URL to any GitHub download link and it relays the request for you.

Mindmap

mindmap
  root((repo))
    What it does
      Relays GitHub downloads
      Speeds up slow access
    Supported content
      Release files
      Source archives
      Single file downloads
      Git clone
    Deployment options
      Cloudflare Workers
      Flask server
      Docker
    Controls
      File size limit
      Allowlist and blocklist
      Request rate limits
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Host a Cloudflare Workers proxy so your team can download GitHub releases at full speed from any region.

USE CASE 2

Run a Flask server on a fast VPS to relay GitHub source archives and release files to users with slow GitHub access.

USE CASE 3

Set up a repository allowlist so your proxy only relays downloads from approved GitHub projects.

USE CASE 4

Use the Docker version to quickly deploy a self-hosted GitHub download relay on your server.

Tech stack

PythonFlaskJavaScriptCloudflare WorkersDocker

Getting it running

Difficulty · moderate Time to first run · 30min

Requires either a Cloudflare account for the Workers version or a server with Python or Docker for the Flask version.

License information is not stated in the explanation.

In plain English

gh-proxy is a proxy tool that speeds up downloads from GitHub for users who face slow or restricted access to the site. Instead of downloading directly from GitHub, you prepend your proxy server's address to any GitHub URL and the request is relayed through the proxy, which can be hosted in a region with better connectivity. The tool supports several types of GitHub content: branch source code archives, release packages and their attached files, individual files from a branch or specific commit, and GitHub Gist raw files. It also supports git clone operations for both public and private repositories (private repos require passing a token in the URL). Two deployment options are provided. The Cloudflare Workers version runs as a serverless script on Cloudflare's global network, with no server required. The free tier allows up to 100,000 requests per day with a limit of 1,000 requests per minute, a paid plan at $5 per month raises that to 10 million requests per month. The Python version uses Flask and can be run directly on a server or via Docker. The Python version also supports extra controls: a file size limit that redirects oversized downloads back to the original GitHub URL, and per-repository blocklists or allowlists. To use the proxy, you copy a GitHub URL and prefix it with the proxy domain. For example, a release file URL becomes the proxy domain followed by the full GitHub release URL. The project includes a public demo instance, though the README advises self-deployment for heavy use to avoid overloading the shared demo. The project is written in Python (for the server version) and JavaScript (for the Cloudflare Workers version).

Copy-paste prompts

Prompt 1
Walk me through deploying gh-proxy as a Cloudflare Worker so I can proxy GitHub release downloads for free within the 100K daily request limit.
Prompt 2
Show me how to configure the gh-proxy Flask version with a file size limit so files over 100MB redirect back to the original GitHub URL instead of being proxied.
Prompt 3
How do I set up gh-proxy using Docker on an Ubuntu VPS and configure it with an allowlist of specific GitHub repos?
Prompt 4
I want to use gh-proxy to speed up git clone for a public GitHub repo. What URL format do I use with my proxy instance?
Open on GitHub → Explain another repo

← hunshcn on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.