aveline
V2EX  ›  PHP

Yet another mirror of Packagist.org

  •  1
     
  •   aveline · Mar 9, 2015 · 6134 views
    This topic created in 4275 days ago, the information mentioned may be changed or developed.

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

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

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

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

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

    Supplement 1  ·  Mar 10, 2015
    啊顺便说一下咱这个用户大部分时候都不会访问到 Toran Proxy 的,在上面加了一层 Cache。
    所以基本上不存在因为连接超时而用不了的情况。
    Supplement 2  ·  Nov 1, 2016
    项目已终止,有需要的可以用 http://pkg.phpcomposer.com/ 。
    16 replies  •  2015-07-15 12:30:49 +08:00
    zieglar
    zieglar
    Mar 9, 2015
    1
    不会 502 么
    aveline
    aveline
    OP
    Mar 9, 2015
    2
    @zieglar 23333333333 又来黑我
    kiritoalex
    kiritoalex
    Mar 9, 2015 via iPhone
    3
    挺不错的,赞一个
    xi4oh4o
    xi4oh4o
    Mar 10, 2015 via Android
    4
    赞!
    anewg
    anewg
    Mar 10, 2015
    5
    给力!
    soulteary
    soulteary
    Mar 10, 2015
    6
    点赞~
    Xrong
    Xrong
    Mar 10, 2015
    7
    点赞...
    kankana
    kankana
    Mar 10, 2015
    8
    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
    aveline
    OP
    Mar 10, 2015❤️1
    9
    @kankana 收到,现在修改。
    这个是我 nginx rewrite rule 的问题 ...
    aveline
    aveline
    OP
    Mar 10, 2015❤️1
    10
    @kankana Fixed
    guangwong
    guangwong
    Apr 8, 2015
    11
    么么哒
    breeswish
    breeswish
    Jul 13, 2015
    12
    @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
    aveline
    OP
    Jul 13, 2015
    13
    @breeswish 好的,源站半个月前切到海外去了 ... 没 header ... 我一会儿改下
    breeswish
    breeswish
    Jul 13, 2015
    14
    @aveline 非常感谢!
    aveline
    aveline
    OP
    Jul 13, 2015
    15
    @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
    breeswish
    Jul 15, 2015
    16
    @aveline 咦,似乎 composer install 时候仍然不会把文件写入缓存…这到底是什么问题呢(composer install -vvv --profile)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1004 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 23:39 · PVG 07:39 · LAX 15:39 · JFK 18:39
    ♥ Do have faith in what you're doing.