介绍
使用go语言编写的持续下行测速脚本,可用于任意平台使用,通过指定URL清单文本文件自动遍历测速,支持多线程,支持多平台
特性
- 轻量级,无依赖
- 采用内存进行缓存数据,不占用磁盘(如果内存较小请使用
gcd
项目),最大程度减少磁盘IO,保护硬盘寿命 - 可自定义最大下载文件大小,超出此值将自动跳过下载
- 可自定义最大协程数,默认为4,内存配置计算公式
- 如下载链接不支持断点续传,则内存公式:
协程数*最大文件大小=建议内存大小
- 如下载链接支持断点续传,则内存公式:
协程数*单次大小(默认20MB)*2=建议内存大小
示例
不支持断点续传
- 设置协程数量:
4
- 设置最大下载文件大小:
1000
MB - 所需内存:
4*1000=4GB
支持断点续传
- 设置协程数量:
4
- 设置单次下载大小:
20
MB - 所需内存:
4*20*2=80MB
使用方法
使用帮助
Usage of GoSpeed:-debug显示调试信息-key string设置网页获取链接的key (default "key")-max int设置单文件最大下载大小(MB),当超出此值时,将自动跳过下载)-start int设置开始时间(小时),默认: 9 (default 9)-stop int设置停止时间(小时),默认: 23 (default 23)-thread int设置线程数 (default 4)-urls string设置url文件 (default "urls.txt")-v 显示版本号
安装
curl -sSL https://gitee.com/liumou_site/GoSpeed/raw/master/install.sh | bash
或者
f=install.sh;rm -f $f;wget https://gitee.com/liumou_site/GoSpeed/raw/master/$f&&bash $f;rm -f $f
root@download2:~# gsd -h
Usage of GoSpeed:-debug显示调试信息-key string设置网页获取链接的key (default "key")-max int设置单文件最大下载大小(MB),当超出此值时,将自动跳过下载)-start int设置开始时间(小时),默认: 9 (default 9)-stop int设置停止时间(小时),默认: 23 (default 23)-thread int设置线程数 (default 4)-urls string设置url文件 (default "urls.txt")-v 显示版本号
root@download2:~# gsd -v
1.2
root@download2:~#
使用效果
The Url https://dl.dhqqs.cc/syd/windows_10_professional_x64_2024.iso supports range requests.
The Url https://dl.dhqqs.cc/syd/windows_10_professional_x64_2024.iso supports range requests.
The Url https://cdn-file-ssl-pc.ludashi.com/pc/installer/buychannel/6.1023.3580.404/ludashi_lite_buychannel_27.exe supports range requests.
The Url https://cdn-file-ssl-pc.ludashi.com/pc/installer/buychannel/6.1023.3580.404/ludashi_lite_buychannel_27.exe supports range requests.
The Url https://file.gc.com.cn/app/20230727_pcpro/pcpro_Install_200075_bdsstg_mnq.exe supports range requests.
The Url https://file.gc.com.cn/app/20230727_pcpro/pcpro_Install_200075_bdsstg_mnq.exe supports range requests.
[2024-06-27 23:03:29] [INFO] [buff:32] Url Downloaded Successfully: https://cdn-file-ssl-pc.ludashi.com/pc/installer/buychannel/6.1023.3580.404/ludashi_lite_buychannel_27.exe
[2024-06-27 23:03:35] [INFO] [buff:32] Url Downloaded Successfully: https://cdn-file-ssl-pc.ludashi.com/pc/installer/buychannel/6.1023.3580.404/ludashi_lite_buychannel_27.exe
[2024-06-27 23:03:39] [INFO] [buff:32] Url Downloaded Successfully: https://cdn-file-ssl-pc.ludashi.com/pc/installer/buychannel/6.1023.3580.404/ludashi_lite_buychannel_27.exe
[2024-06-27 23:03:39] [INFO] [buff:32] Url Downloaded Successfully: https://softforspeed.51xiazai.cn/alading/2345pinyin_lm_625361_v7.5.1.8242.exe
[2024-06-27 23:03:41] [INFO] [buff:32] Url Downloaded Successfully: https://softforspeed.51xiazai.cn/alading/2345pinyin_lm_625361_v7.5.1.8242.exe
[2024-06-27 23:03:47] [INFO] [buff:32] Url Downloaded Successfully: https://cdn-file-ssl-pc.ludashi.com/pc/installer/buychannel/6.1023.3580.404/ludashi_lite_buychannel_27.exe
[2024-06-27 23:03:47] [INFO] [buff:32] Url Downloaded Successfully: https://cdn-file-ssl-pc.ludashi.com/pc/installer/buychannel/6.1023.3580.404/ludashi_lite_buychannel_27.exe