{"id":13453386,"url":"https://github.com/crazypeace/gh-proxy","last_synced_at":"2025-03-24T01:31:24.135Z","repository":{"id":169835158,"uuid":"604963951","full_name":"crazypeace/gh-proxy","owner":"crazypeace","description":"github release、archive以及项目文件的加速项目. 支持 api.github.com, git.io 支持github脚本的无限嵌套调用","archived":false,"fork":true,"pushed_at":"2024-10-28T00:03:53.000Z","size":150,"stargazers_count":51,"open_issues_count":0,"forks_count":25,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-10-28T04:58:51.202Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://crazypeace.github.io/gh-proxy/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"hunshcn/gh-proxy","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crazypeace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-22T06:34:54.000Z","updated_at":"2024-10-28T00:03:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"78367c9f-656e-49f2-9e02-7dfbec9695c3","html_url":"https://github.com/crazypeace/gh-proxy","commit_stats":null,"previous_names":["crazypeace/gh-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazypeace%2Fgh-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazypeace%2Fgh-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazypeace%2Fgh-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazypeace%2Fgh-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crazypeace","download_url":"https://codeload.github.com/crazypeace/gh-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245194219,"owners_count":20575725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T08:00:39.161Z","updated_at":"2025-03-24T01:31:23.846Z","avatar_url":"https://github.com/crazypeace.png","language":"JavaScript","funding_links":[],"categories":["加速","Beschleunigung"],"sub_categories":[],"readme":"# gh-proxy\n\n## 我的修改\n[增加支持 api.github.com](https://zelikk.blogspot.com/2023/03/github-proxy-api-github-com.html)\n\n增加支持 git.io\n\n做了工具页面, 方便使用 \nhttps://ghproxy.crazypeace.workers.dev/\n\n用法演示视频   \nhttps://youtu.be/F9re4Tuy7BA\n\n支持github脚本的无限嵌套调用 演示视频  \nhttps://youtu.be/5zCJsCoi_lQ\n\n在 Cloudflare 的 worker 上自建 Github 代理 教程  \nhttps://zelikk.blogspot.com/2023/06/gh-proxy-worker.html\n\n在 Replit 上自建 Github 代理 教程  \nhttps://zelikk.blogspot.com/2023/07/replit-gh-proxy.html\n\n\u003cdetails\u003e\n    \u003csummary\u003e原项目readme (点击展开)\u003c/summary\u003e\n  \n## 简介\n\ngithub release、archive以及项目文件的加速项目，支持clone，有Cloudflare Workers无服务器版本以及Python版本\n\n## 演示\n\n[https://gh.api.99988866.xyz/](https://gh.api.99988866.xyz/)\n\n演示站为公共服务，如有大规模使用需求请自行部署，演示站有点不堪重负\n\n![imagea272c95887343279.png](https://img.maocdn.cn/img/2021/04/24/imagea272c95887343279.png)\n\n当然也欢迎[捐赠](#捐赠)以支持作者\n\n## python版本和cf worker版本差异\n\n- python版本支持进行文件大小限制，超过设定返回原地址 [issue #8](https://github.com/hunshcn/gh-proxy/issues/8)\n\n- python版本支持特定user/repo 封禁/白名单 以及passby [issue #41](https://github.com/hunshcn/gh-proxy/issues/41)\n\n## 使用\n\n直接在copy出来的url前加`https://gh.api.99988866.xyz/`即可\n\n也可以直接访问，在input输入\n\n***大量使用请自行部署，以上域名仅为演示使用。***\n\n访问私有仓库可以通过\n\n`git clone https://user:TOKEN@ghproxy.com/https://github.com/xxxx/xxxx` [#71](https://github.com/hunshcn/gh-proxy/issues/71)\n\n以下都是合法输入（仅示例，文件不存在）：\n\n- 分支源码：https://github.com/hunshcn/project/archive/master.zip\n\n- release源码：https://github.com/hunshcn/project/archive/v0.1.0.tar.gz\n\n- release文件：https://github.com/hunshcn/project/releases/download/v0.1.0/example.zip\n\n- 分支文件：https://github.com/hunshcn/project/blob/master/filename\n\n- commit文件：https://github.com/hunshcn/project/blob/1111111111111111111111111111/filename\n\n- gist：https://gist.githubusercontent.com/cielpy/351557e6e465c12986419ac5a4dd2568/raw/cmd.py\n\n## cf worker版本部署\n\n首页：https://workers.cloudflare.com\n\n注册，登陆，`Start building`，取一个子域名，`Create a Worker`。\n\n复制 [index.js](https://cdn.jsdelivr.net/gh/hunshcn/gh-proxy@master/index.js)  到左侧代码框，`Save and deploy`。如果正常，右侧应显示首页。\n\n`ASSET_URL`是静态资源的url（实际上就是现在显示出来的那个输入框单页面）\n\n`PREFIX`是前缀，默认（根路径情况为\"/\"），如果自定义路由为example.com/gh/*，请将PREFIX改为 '/gh/'，注意，少一个杠都会错！\n\n## Python版本部署\n\n### Docker部署\n\n```\ndocker run -d --name=\"gh-proxy-py\" \\\n  -p 0.0.0.0:80:80 \\\n  --restart=always \\\n  hunsh/gh-proxy-py:latest\n```\n\n第一个80是你要暴露出去的端口\n\n### 直接部署\n\n安装依赖（请使用python3）\n\n```pip install flask requests```\n\n按需求修改`app/main.py`的前几项配置\n\n*注意:* 可能需要在`return Response`前加两行\n```python3\nif 'Transfer-Encoding' in headers:\n    headers.pop('Transfer-Encoding')\n```\n\n### 注意\n\npython版本的机器如果无法正常访问github.io会启动报错，请自行修改静态文件url\n\npython版本默认走服务器（2021.3.27更新）\n\n## Cloudflare Workers计费\n\n到 `overview` 页面可参看使用情况。免费版每天有 10 万次免费请求，并且有每分钟1000次请求的限制。\n\n如果不够用，可升级到 $5 的高级版本，每月可用 1000 万次请求（超出部分 $0.5/百万次请求）。\n\n## Changelog\n\n* 2020.04.10 增加对`raw.githubusercontent.com`文件的支持\n* 2020.04.09 增加Python版本（使用Flask）\n* 2020.03.23 新增了clone的支持\n* 2020.03.22 初始版本\n\n## 链接\n\n[我的博客](https://hunsh.net)\n\n## 参考\n\n[jsproxy](https://github.com/EtherDream/jsproxy/)\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazypeace%2Fgh-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazypeace%2Fgh-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazypeace%2Fgh-proxy/lists"}