使用多个连接下载curl [英] downloading with curl using multiple connections

查看:301
本文介绍了使用多个连接下载curl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将多个gb文件从一个服务器传输到另一个服务器;问题是RTT是150ms +。 Ive已经尝试使用aria2,但它只限于16个连接,lftp没有任何保护阻止传输。

I'm trying to tranfer a multi-gb file from one server to another; problem is RTT is 150ms+. Ive already tried using aria2 but its limited to 16 connections, lftp doesn't have any protection against stalled transfers.

我想知道是否可以下载一个文件多个连接使用curl cli。

I'm wondering if its possible to download one file with multiple connections using curl cli.

推荐答案

有一个脚本

There's a script called pcurl that wraps curl to do multiple simultaneous downloads and then combine them when complete.

它默认为10个连接,但默认为10个连接。这可以在第81行的MAX_SEGMENTS中更改。

It defaults to 10 connections but this can be changed in the MAX_SEGMENTS on line 81.

它是这样调用的:

./pcurl.sh http://myurl.to/a/very/largefile.zip

这篇关于使用多个连接下载curl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆