使用Go编写的持续下行测速脚本,快速消耗流量且不伤硬盘

介绍

使用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

在这里插入图片描述

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-10 18:38:04       5 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-10 18:38:04       5 阅读
  3. 在Django里面运行非项目文件

    2024-07-10 18:38:04       4 阅读
  4. Python语言-面向对象

    2024-07-10 18:38:04       6 阅读

热门阅读

  1. 四、Python日志系统之日志文件的备份和删除

    2024-07-10 18:38:04       9 阅读
  2. ZC2205-24V500mAUltralow-Quiescent-Current LDO

    2024-07-10 18:38:04       7 阅读
  3. 六、golang基础之面向对象特征

    2024-07-10 18:38:04       7 阅读
  4. 开源项目的机遇与挑战

    2024-07-10 18:38:04       11 阅读
  5. 关于go和rust语言的对比

    2024-07-10 18:38:04       8 阅读
  6. python入门基础知识·二

    2024-07-10 18:38:04       7 阅读
  7. 概率基础——矩阵正态分布matrix normal distribution

    2024-07-10 18:38:04       7 阅读
  8. 网络编程:常用网络测试工具

    2024-07-10 18:38:04       11 阅读
  9. 在 React 中使用自定义 Hooks 封装 Service 逻辑

    2024-07-10 18:38:04       10 阅读