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

Acceleration for downloading GitHub Releases files / GitHub Releases 下载加速 #10

Open
LussacZheng opened this issue Apr 28, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@LussacZheng
Copy link
Owner

Acceleration for downloading GitHub Releases files / GitHub Releases 下载加速

Keywords: github releases, download, proxy, accelerate, mirrors

English translation is NOT provided for this record. Please translate it by yourself.


Issue

部署 (deploy) 或升级 (upgrade) youtube-dl (仅 绿色配置 时) 和 annie 都需要从 GitHub Releases 下载文件。对于国内网络,下载速度可能十分缓慢,甚至无法下载。

此前有两种解决方案:

  1. 亲自下载并上传相应文件到网盘,引导用户从网盘手动下载;
  2. 用户自行配置代理。

二者都需要一定的额外操作,似乎并不是真正的“一键脚本”。而且这样会增加第一次使用此脚本的用户的上手难度,降低使用体验。

因此,我正在探索如何提高国内网络从 GitHub Releases 上下载文件的速度。

在不使用 VPS (即没有捐助资金)的前提下,目前一个比较可行的解决方案是:GitHub - hunshcn/gh-proxy ,即利用 Cloudflare Workers 代理加速 GitHub Releases 的文件下载。

尝试直接部署到 Cloudflare Worker 后,确实能提升 Releases 文件的下载速度,而且能够直接通过拼接的直链下载。但初步看来,目前还需要解决两个问题:

  1. Cloudflare Workers 免费用户每日只有 10 万次的免费请求额度。为了避免被滥用,应当限定只能代理若干个指定的项目仓库,甚至限制只代理 Releases Assets 文件。
    对于本项目,可以限制为只代理以下几个 repos :

    ['ytdl-org/youtube-dl', 'iawia002/annie', 'soimort/you-get']
  2. 稳定性如何?若 Cloudflare Worker 的三级域名 失效/被墙 ,如何在用户不更新脚本文件的前提下解决?

如有后续进展,一并在此 Issue 下记录。

@LussacZheng LussacZheng self-assigned this Apr 28, 2020
@LussacZheng LussacZheng added the enhancement New feature or request label Apr 28, 2020
@LussacZheng LussacZheng pinned this issue Apr 30, 2020
Repository owner locked and limited conversation to collaborators Mar 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant