mirror-requests icon indicating copy to clipboard operation
mirror-requests copied to clipboard

反代 Packagist 镜像

Open xiaohuilam opened this issue 6 years ago • 4 comments

类别:Bug 反馈

镜像名:Packagist

上游路径:packagist.org、api.github.com、

镜像简介: 因为 composer 官方镜像源 packagist.org 默认使用了 api.github.com/zipball 做为 dist,而贵镜像处理逻辑没有对 dist 做处理, 实质上没起到加速效果。 image

例如 https://mirrors.sjtug.sjtu.edu.cn/packagist/p/0s1r1s/dev-shortcuts-bundle$f4f323c06b2346c9e734c57395fd17a0b9c18aa99fdbc99485949a5f23c1f4e0.json 这个包的 json 中的 dist 依旧为 github.com 的连接。

xiaohuilam avatar Jul 02 '19 06:07 xiaohuilam

该镜像仅同步了 metadata,而非全量同步。

skyzh avatar Jul 02 '19 11:07 skyzh

反代 github 或者全量同步实现起来比较困难,所以就没有做。。。

skyzh avatar Jul 02 '19 11:07 skyzh

Why full synchronization is difficult, the server resource is not enough?

yuanzhel avatar Jul 02 '19 12:07 yuanzhel

可以参考阿里云镜像的做法 image

这样 dist 元数据不用任何处理,只需要在mirror的endpoint中搭建反代缓存服务,即可自动替换 image

xiaohuilam avatar Jul 03 '19 02:07 xiaohuilam