Github 文件加速更新,支持 clone 加速

2020-03-24 13:23:16 +08:00
 just1

gh-proxy

前情提要

/t/655015

现在支持了 clone,并且有两种方式可以选择

1 clone 走 github.com.cnpmjs.org (302) (默认)

2 clone 走 cloudflare workers

简介

利用 Cloudflare Workers 对 github release 、archive 以及项目文件进行加速,并且支持 clone,部署无需服务器且自带 cdn 。

演示

https://gh.api.99988866.xyz/

使用 直接在 copy 出来的文件 url 或者 https clone 地址前加https://gh.api.99988866.xyz/ 即可 比如

git clone https://gh.api.99988866.xyz/https://github.com/hunshcn/gh-proxy.git

也可以直接访问,在 input 输入

更多使用方法可以移步我的博客

代码

开源于 Github https://github.com/hunshcn/gh-proxy

7267 次点击
所在节点    分享创造
25 条回复
huyinjie
2020-07-09 19:40:31 +08:00
感谢楼主 请问是否能支持下类似 https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh 的加速,某些云服务连接不上
lxk11153
2020-08-04 10:37:11 +08:00
"warning: redirecting to" 是怎么了?
just1
2020-08-04 11:05:40 +08:00
lxk11153
2020-08-04 11:12:53 +08:00
@just1 #23 不过现在又快起来了,之前有次几 kb/s
> git clone --depth 1 'https://gh.api.99988866.xyz/https://github.com/DaHMao/SameCourse.git'
Cloning into 'SameCourse'...
warning: redirecting to https://github.com.cnpmjs.org/DaHMao/SameCourse.git/

> git clone 'https://gh.api.99988866.xyz/https://github.com/DaHMao/SameCourse.git'
Cloning into 'SameCourse'...
warning: redirecting to https://github.com.cnpmjs.org/DaHMao/SameCourse.git/
just1
2020-08-04 12:13:39 +08:00
@lxk11153 #24 因为演示站就是重定向到 cnpmjs 的镜像,这个是香港阿里云,国内访问正常会比 cf 快,这个 warning 可以无视,是正确的

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/655671

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX