V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
aveline
V2EX  ›  PHP

Yet another mirror of Packagist.org

  •  1
     
  •   aveline · 2015-03-09 22:58:40 +08:00 · 5184 次点击
    这是一个创建于 3336 天前的主题,其中的信息可能已经有所发展或是发生改变。

    基于 Toran Proxy 构建的另一个 Packagist.org 的镜像。

    与其他镜像不同的是,这个镜像存储分别在常州、洛杉矶,一般情况下挂不掉,同时启用了 CDN 加速,可以提供更快的安装速度。

    目前同步了 2980 个包,共使用了 23GB 的磁盘空间。

    详细列表可查看:https://toran.reimu.io/packages.txt

    地址戳这里 https://toran.reimu.io/

    第 1 条附言  ·  2015-03-10 02:22:09 +08:00
    啊顺便说一下咱这个用户大部分时候都不会访问到 Toran Proxy 的,在上面加了一层 Cache。
    所以基本上不存在因为连接超时而用不了的情况。
    第 2 条附言  ·  2016-11-01 12:47:56 +08:00
    项目已终止,有需要的可以用 http://pkg.phpcomposer.com/
    16 条回复    2015-07-15 12:30:49 +08:00
    zieglar
        1
    zieglar  
       2015-03-09 23:15:40 +08:00
    不会 502 么
    aveline
        2
    aveline  
    OP
       2015-03-09 23:17:45 +08:00
    @zieglar 23333333333 又来黑我
    kiritoalex
        3
    kiritoalex  
       2015-03-09 23:50:29 +08:00 via iPhone
    挺不错的,赞一个
    xi4oh4o
        4
    xi4oh4o  
       2015-03-10 00:15:54 +08:00 via Android
    赞!
    anewg
        5
    anewg  
       2015-03-10 00:22:34 +08:00
    给力!
    soulteary
        6
    soulteary  
       2015-03-10 02:13:10 +08:00
    点赞~
    Xrong
        7
    Xrong  
       2015-03-10 08:24:11 +08:00
    点赞...
    kankana
        8
    kankana  
       2015-03-10 09:49:24 +08:00
    lz这边有个404问题.

    [Composer\Downloader\TransportException]
    The "https://toran.reimu.io/repo/packagist/p/composer-plugin-api.json" file
    could not be downloaded (HTTP/1.1 404 Not Found)


    -----

    另外一个404问题, 是关于私有库.

    用户是有可能从, 比如bitbucket, 下载私有库的.

    "repositories": [

    {
    "type": "git",
    "url": "[email protected]:non-exist/package.git"
    }
    ],

    你看他们是如何处理这类私有库问题

    https://packagist.org/packages/non-exist/package.json 自定义404

    http://pkg.phpcomposer.com/repo/packagist/p/non-exist/package.json 200

    https://toran.reimu.io/repo/packagist/p/non-exist/package.json nginx404

    你的服务器是由nginx扔出404

    如果对方真的是下载私有库, 很明显这个库是不存在于packagist, 报404, 看起来是正确的做法, 但实际上一旦服务器出现404, composer直接罢工, 根本没机会去bitbucket下载私有库.
    aveline
        9
    aveline  
    OP
       2015-03-10 10:07:58 +08:00   ❤️ 1
    @kankana 收到,现在修改。
    这个是我 nginx rewrite rule 的问题 ...
    aveline
        10
    aveline  
    OP
       2015-03-10 10:12:14 +08:00   ❤️ 1
    @kankana Fixed
    guangwong
        11
    guangwong  
       2015-04-08 13:06:46 +08:00
    么么哒
    breeswish
        12
    breeswish  
       2015-07-13 21:46:08 +08:00
    @aveline

    求增加 cache header…没 cache header 情况下中断要全部重下 meta..

    [8.6MB/0.20s] Downloading https://toran.reimu.io/repo/packagist/p/symfony/symfony.json
    [15.3MB/0.84s] Downloading https://toran.reimu.io/repo/packagist/p/doctrine/orm.json
    [15.7MB/1.01s] Downloading https://toran.reimu.io/repo/packagist/p/doctrine/dbal.json
    [16.0MB/1.15s] Downloading https://toran.reimu.io/repo/packagist/p/doctrine/doctrine-bundle.json
    [16.1MB/1.29s] Downloading https://toran.reimu.io/repo/packagist/p/symfony/assetic-bundle.json
    [16.3MB/1.61s] Downloading https://toran.reimu.io/repo/packagist/p/symfony/swiftmailer-bundle.json
    [18.6MB/2.24s] Downloading https://toran.reimu.io/repo/packagist/p/symfony/monolog-bundle.json

    官方:

    [49.6MB/35.20s] Writing /Users/Breezewish/.composer/cache/repo/https---packagist.org/provider-symfony$symfony.json into cache
    [53.6MB/35.83s] Downloading http://packagist.org/p/doctrine/orm$78852554f8bd8d5c17337a035c2f3c3eff80fe729b71683e0f5c6f709d48aed3.json
    [54.6MB/37.16s] Writing /Users/Breezewish/.composer/cache/repo/https---packagist.org/provider-doctrine$orm.json into cache
    [54.0MB/37.18s] Downloading http://packagist.org/p/doctrine/dbal$5120f2f930640557ffe653cfb19a9dfe505f837654a29a58954f4dfc10d1407d.json
    [54.6MB/38.02s] Writing /Users/Breezewish/.composer/cache/repo/https---packagist.org/provider-doctrine$dbal.json into cache
    [54.2MB/38.03s] Downloading http://packagist.org/p/doctrine/doctrine-bundle$fd350dfa56007b2e9e9f70199c10ef99c439c6803d58ceca7240109934e37f2f.json
    [54.4MB/39.38s] Writing /Users/Breezewish/.composer/cache/repo/https---packagist.org/provider-doctrine$doctrine-bundle.json into cache
    [54.4MB/39.39s] Downloading http://packagist.org/p/symfony/assetic-bundle$054ae33654538a2ae32a2a2d45c534ead385d9a686227bc25c4c9ffe3aeae344.json
    aveline
        13
    aveline  
    OP
       2015-07-13 22:08:17 +08:00
    @breeswish 好的,源站半个月前切到海外去了 ... 没 header ... 我一会儿改下
    breeswish
        14
    breeswish  
       2015-07-13 22:20:57 +08:00
    @aveline 非常感谢!
    aveline
        15
    aveline  
    OP
       2015-07-13 22:47:27 +08:00
    @breeswish

    已经加上:

    ```
    HTTP/1.1 200 OK
    Date: Mon, 13 Jul 2015 14:47:36 GMT
    Content-Type: application/json; charset=utf-8
    Content-Length: 105143
    Connection: keep-alive
    Server: nginx
    Last-Modified: Tue, 07 Jul 2015 15:10:18 GMT
    Cache-Control: public, max-age=300
    ETag: "559bebda-19ab7"
    Strict-Transport-Security: max-age=31536000; includeSubdomains; preload;
    X-Misaka-Cache: EXPIRED from cn-pvg-azure-a
    X-ORCA-Accelerator: MISS from 033.mul.khh01.tw.krill.c3edge.net
    X-ORCA-Accelerator: HIT from 002.mul.sjc01.us.krill.c3edge.net
    Accept-Ranges: bytes
    ```
    breeswish
        16
    breeswish  
       2015-07-15 12:30:49 +08:00
    @aveline 咦,似乎 composer install 时候仍然不会把文件写入缓存…这到底是什么问题呢(composer install -vvv --profile)
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2884 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:29 · PVG 20:29 · LAX 05:29 · JFK 08:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.