HMCL-dev / HMCL

A Minecraft Launcher which is multi-functional, cross-platform and popular
https://hmcl.huangyuhui.net
GNU General Public License v3.0
6.89k stars 676 forks source link

Feature 为下载地址嵌套一个或者多个中转地址 #2399

Open 8MiYile opened 1 year ago

8MiYile commented 1 year ago

描述 Description

我说的这种中转理论上是支持所有的网站 就是在下载地址前面插入

https://vercel.rpdl.8mi.work/
https://cloudflare.rpdl.8mi.work/

例如 https://cloudflare.rpdl.8mi.work/https://resource.minecraft.mojang.com/xxx 这样的地址 这种方法需要样本的测试 又或者是需要HMCL官网预留中转加速地址列表

原因 Why

为bmclapi减负 给mod下载加速

burningtnt commented 1 year ago

那请你确保 https://cf-proxy-dl.8mi.work/ 永远不跑路 上一个跑路的案例是 https://github.com.cnpmjs.org/

zkitefly commented 1 year ago

那请你确保 https://cf-proxy-dl.8mi.work/ 永远不跑路

我觉得可以让用户自己搭建,然后手动输入

8MiYile commented 1 year ago

那请你确保 https://cf-proxy-dl.8mi.work/ 永远不跑路

我觉得可以让用户自己搭建,然后手动输入

这个搭建方法很简单 可以参考ghproxy.con

8MiYile commented 1 year ago

那请你确保 https://cf-proxy-dl.8mi.work/ 永远不跑路 上一个跑路的案例是 https://github.com.cnpmjs.org/

域名我都在续费的 这个服务器是cloudflare提供的 然后我也没说一定只使用我的服务器 毕竟我那个服务器1天限制10万请求量

burningtnt commented 1 year ago

w

那请你确保 https://cf-proxy-dl.8mi.work/ 永远不跑路 上一个跑路的案例是 https://github.com.cnpmjs.org/

域名我都在续费的 这个服务器是cloudflare提供的

你可以去和 HMCL 管理者(比如黄鱼、Glavo)达成协议

8MiYile commented 1 year ago

w

那请你确保 https://cf-proxy-dl.8mi.work/ 永远不跑路 上一个跑路的案例是 https://github.com.cnpmjs.org/

域名我都在续费的 这个服务器是cloudflare提供的

你可以去和 HMCL 管理者(比如黄鱼、Glavo)达成协议

而且真正落地的服务器不只是我这一个中继,他们也会去申请增加

zkitefly commented 1 year ago

image :thinking:

8MiYile commented 1 year ago

@zkitefly 对头 就是这个 地址列表可以在hmcl官网更新

zkitefly commented 1 year ago

你也可以看看这个反向代理:https://github.com/gaboolic/vercel-reverse-proxy

https://github.com/gaboolic/cloudflare-reverse-proxy

zkitefly commented 1 year ago

cloudflare workers 的限制每天 10 万此请求

而这个是 BMCLAPI 的当日请求

image

8MiYile commented 1 year ago

@zkitefly 用多个cf worker叠加

8MiYile commented 1 year ago

你也可以看看这个反向代理:https://github.com/gaboolic/vercel-reverse-proxy

https://github.com/gaboolic/cloudflare-reverse-proxy

他那个不太符合启动器的 虽说方案很好 我看着他的那个方案直接改了一版出来 更适合我想要的这种情况 image 那个vercel的和cloudflare的差不多对吧

zkitefly commented 1 year ago

qwq

自己尝试用 cf workers 搭建了两个反代

https://gp.zkitefly.eu.org/ (GitHub 文件加速~减速~)

https://cfp.zkitefly.eu.org/ (这个后面加要反代的地址)

Vercel:

https://vcp.zkitefly.eu.org/ (这个后面加要反代的地址)

Glavo commented 1 year ago

我在考虑对下载源设置这方面进行大修,比如优化混合源(下载镜像源不存在的文件时回退到官方源)等。

我在考虑要不要重构的时候添加对用户提供的下载源的支持,这样可以提供更精细的控制,比如对不同的资源走不同的代理地址。

burningtnt commented 1 year ago

大修时请注意和 #2411 的兼容性