Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

夸克下载限速 #4175

Closed
4 tasks done
the-404 opened this issue Apr 16, 2023 · 11 comments
Closed
4 tasks done

夸克下载限速 #4175

the-404 opened this issue Apr 16, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@the-404
Copy link

the-404 commented Apr 16, 2023

Please make sure of the following things

  • I have read the documentation.
  • I'm sure there are no duplicate issues or discussions.
  • I'm sure it's due to alist and not something else(such as Dependencies or Operational).
  • I'm sure I'm using the latest version

Alist Version / Alist 版本

Main

Driver used / 使用的存储驱动

quark

Describe the bug / 问题描述

quark 下载时候被限速。今天尝试使用最新代码,然后编译。作者添加了range头并未改善限速。

通过分析alist夸克的下载请求,当下载资源在较小时候,例如十几兆,下载不会限速。大于100mb的资源必备限速。
通过分析客户端,推测可能是下载时候使用多线程方式,按照某个特定大小进行切片,切片大小在8M~18M,如下图:
WX20230417-010300@2x

目前看到切片大小没超过20M,然后尝试使用aria2复现,发现下载速度较正常
得出结论如下:
当range切片为8~18mb左右时候,下载速度可以比较理想化,通过修改aria2下载器的range设置,得出结果。
下图为设置:
WX20230417-003414@2x
下图为下载启动时候速度:
image
下图为多任务下载时稳定速度:
image
下图为客户端下载时候速度:
1771681664064_ pic

Reproduction / 复现链接

下图为100多mb和10几mb通过alist的quark驱动下载:
WX20230417-002903@2x

Logs / 日志

No response

@the-404 the-404 added the bug Something isn't working label Apr 16, 2023
@the-404
Copy link
Author

the-404 commented Apr 16, 2023

如果需要修改驱动代码,可能需要使用多线程切片下载。如果为了不影响在线观看,可考虑顺序切片。
对于使用alist 在线观看视频,是否作者可考虑使用quark的在线播放资源接口?在线播放接口的弊端就是视频会被转码压缩。
在线播放接口我通过使用客户端进行投屏,捕获到视频url,使用chrome浏览器播放(未登录网盘),无限速。快进后退都正常。
我尝试获取客户端和网页的播放地址,发现请求时候会提示Referer ACL。
获取在线播放的接口

POST /1/clouddrive/file/v2/play?pr=ucpro&fr=pc&ve=2.5.20 
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) quark-cloud-drive/2.5.20 Chrome/100.0.4896.160 Electron/18.3.5.4-b478491100 Safari/537.36 Channel/pckk_other_ch
Referer: https://pan.quark.cn/
参数:{"fid":"  ","resolutions":"normal,low,high,super,2k,4k","supports":"fmp4"}

@chenyong0709
Copy link

确实可行。
111

@the-404
Copy link
Author

the-404 commented Apr 17, 2023

突然来了灵感,获取alist中的quark下载地址,然后交给aria2 下载,速度比较理想。
WX20230417-113238@2x
WX20230417-113254@2x
但是如果想在线看,估计需要有个支持多线程的在线播放器。目前kodi、vlc、potplayer、nplayer好像都不可以。
又或者使用之前我提到的视频播放接口。

@xhofe xhofe closed this as completed in 8711f2a Apr 17, 2023
@xhofe
Copy link
Collaborator

xhofe commented Apr 17, 2023

https://github.com/alist-org/alist/actions/runs/4718633189 中已改为分片下载,每片10MB。无会员测试速度为1MB/s

@the-404
Copy link
Author

the-404 commented Apr 17, 2023

测试了下 会员可以到12Mb/s
WX20230417-174422@2x

@zhendery
Copy link

https://github.com/alist-org/alist/actions/runs/4718633189 中已改为分片下载,每片10MB。无会员测试速度为1MB/s

这个很可以!希望能进下个release版本!

@zhendery
Copy link

docker看这里:https://github.com/alist-org/alist/actions/runs/4718633190
即 docker pull xhofe/alist:main

@lin-cop
Copy link

lin-cop commented Apr 27, 2023

这个分片下载能否推广到其他网盘呢,例如 onedrive,百度网盘,迅雷网盘等,以后挂载就不用再加上 user-agent 了,而是直接使用 alist 的功能加速下载。
我的想法是,这个分片的功能可以作为 alist 基本功能的一部分,因为几乎所有的网盘其实都是潜在的提速下载需求, 这样做的好处就是被限速的网盘可以破除限速,没有限速的网盘则是尽可能跑满本地带宽。
虽然这个 issues 已经关闭,我觉得很有必要产生这种需求,尤其是对于有想在线看4K电影的小伙伴来说,说不定,如果能实现分片,多线程下载加速的话,在线看4K电影都是有可能实现的

@SeanHeuc
Copy link
Contributor

这个分片下载能否推广到其他网盘呢,例如 onedrive,百度网盘,迅雷网盘等,以后挂载就不用再加上 user-agent 了,而是直接使用 alist 的功能加速下载。 我的想法是,这个分片的功能可以作为 alist 基本功能的一部分,因为几乎所有的网盘其实都是潜在的提速下载需求, 这样做的好处就是被限速的网盘可以破除限速,没有限速的网盘则是尽可能跑满本地带宽。 虽然这个 issues 已经关闭,我觉得很有必要产生这种需求,尤其是对于有想在线看4K电影的小伙伴来说,说不定,如果能实现分片,多线程下载加速的话,在线看4K电影都是有可能实现的

这个已经实现了,多chunk分段多线程下载,并完整支持header range。 后面看机会会合并到主分支。
(为了实现其他的一个功能,我不得不顺便把这个先做了😅)

@chaoqunxie
Copy link

https://github.com/alist-org/alist/actions/runs/4718633189 中已改为分片下载,每片10MB。无会员测试速度为1MB/s

突然来了灵感,获取alist中的quark下载地址,然后交给aria2 下载,速度比较理想。 WX20230417-113238@2x WX20230417-113254@2x 但是如果想在线看,估计需要有个支持多线程的在线播放器。目前kodi、vlc、potplayer、nplayer好像都不可以。 又或者使用之前我提到的视频播放接口。

无会员1M/s 已经很棒了

@arielherself
Copy link

image

这方法确实好用,实测 aria2c --max-connection-per-server=1024 --split=1024 --min-split=1K 下,无会员可以跑满小水管。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants