A GitHub release asset download service inspired by gh-proxy
This is a Next.js project bootstrapped with create-next-app.
The old version is archived now. See v1 branch for the old version.
v2 is still in development.🚧
Clone the Repository
git clone https://github.com/your-username/ghproxy-plus.git
cd ghproxy-plusInstall Dependencies
npm install
# or
yarn install
# or
pnpm install
# or
bun installBuild the Project
npm build
# or
yarn build
# or
pnpm build
# or
bun buildStart the Server
npm start
# or
yarn start
# or
pnpm start
# or
bun startThe easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
Endpoint: /api/ghproxy/{github-url}
Proxies GitHub resources with CORS headers, allowing accelerated access to GitHub files, releases, and repositories.
Supported URL Types:
- GitHub releases and archives:
github.com/{owner}/{repo}/releases/* - GitHub raw files:
github.com/{owner}/{repo}/blob/*orgithub.com/{owner}/{repo}/raw/* - GitHub raw content:
raw.githubusercontent.com/*orraw.github.com/* - GitHub gists:
gist.githubusercontent.com/*orgist.github.com/* - GitHub repository info:
github.com/{owner}/{repo}/info/*orgithub.com/{owner}/{repo}/git-* - GitHub tags:
github.com/{owner}/{repo}/tags/*
Example:
curl https://your-domain.com/api/ghproxy/https://github.com/owner/repo/releases/download/v1.0.0/file.zipResponse:
- Success: Proxied content with CORS headers
- Error 400: Invalid or unsupported URL
- Error 403: URL blocked by whitelist (if configured)
- Error 500: Fetch error
Endpoint: /api/download/{github-repo-url}
Automatically detects the user's operating system and architecture from the User-Agent header and downloads the most appropriate release asset from the latest release.
Parameters:
keyword(optional): Additional keyword to filter assets
Example:
curl -L [https://your-domain.com/api/download/https://github.com/owner/repo]
Don't fetch it! You can only access it through the browser.
Detection Logic:
- Parses User-Agent to determine OS (Windows, macOS, Linux, Android, iOS, etc.)
- Detects CPU architecture (x86_64, arm64, etc.)
- Automatically selects the best matching asset from the latest release
- Falls back to first asset if no match found
Note: The web UI provides an option to generate download URLs from the default branch when no releases are found.
Response:
- Success (302): Redirects to the download URL via
/api/ghproxy/ - Error (302): Redirects to 404 page if repo not found or no suitable asset
Endpoint: /api/ping
Health check endpoint that returns server status information.
Example:
curl https://your-domain.com/api/pingResponse:
{
"message": "pong",
"uptime": 12345.67,
"timestamp": "2024-01-01T00:00:00.000Z",
"pid": 1234
}First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying src/app/page.tsx. The page auto-updates as you edit the file.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!