sjtug / mirror-requests

新镜像请求 & BUG 汇报
https://mirrors.sjtug.sjtu.edu.cn
48 stars 2 forks source link

反代 Packagist 镜像 #55

Open xiaohuilam opened 5 years ago

xiaohuilam commented 5 years ago

类别: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 的连接。

skyzh commented 5 years ago

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

skyzh commented 5 years ago

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

yuanzhel commented 5 years ago

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

xiaohuilam commented 5 years ago

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

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