gorilla-devs / GDLauncher

GDLauncher is a simple, yet powerful Minecraft custom launcher with a strong focus on the user experience
https://gdevs.io
GNU General Public License v3.0
1.21k stars 250 forks source link

[Feature] Faster downloading speed... #824

Open alex3236 opened 3 years ago

alex3236 commented 3 years ago

Is your feature request related to a problem? Please describe. In China and Japan, download speed is very slow. 75KB/sec

Describe the solution you'd like Support of SOCKS5/HTTP proxy.

Describe alternatives you've considered Download files using mirrors, such as BMCLAPI

blarfoon commented 3 years ago

Can you specify what assets are slow to be downloaded? Most of the stuff is downloaded from 3rd party websites so we don't have much control over them

blarfoon commented 3 years ago

Also, the website you linked is not working

alex3236 commented 3 years ago

Download speed: Minecraft itself(50\~150KB/s) < Fabric(90\~200KB/s) ≈ Others. Sometimes it gets stuck in a certain progress like 33%, which is also caused by network problems. (Connection lost)

alex3236 commented 3 years ago

The official website of BMCLAPI seems to have some problems recently, sometimes it is inaccessible, but the API runs normally.、 So here is the documentation for BMCLAPI:

The goal of BMCLAPI is to be 100% compatible with the official file directory structure, although the root paths of some resources may differ because it is a multi-source unification. Those who are familiar with C# can refer to BMCL's Mirror implementation https://github.com/bangbang93/BMCL/tree/master/BMCLV2/Mirrors

Version information

http://launchermeta.mojang.com/mc/game/version_manifest.json -> https://bmclapi2.bangbang93.com/mc/game/version_manifest.json

Version, Version JSON and AssetsIndex

Replace the URLs within the version information: https://launchermeta.mojang.com/ or https://launcher.mojang.com/ ->https://bmclapi2.bangbang93.com

Assets

http://resources.download.minecraft.net -> https://bmclapi2.bangbang93.com/assets

Libraries

https://libraries.minecraft.net/ -> https://bmclapi2.bangbang93.com/maven

Forge

https://files.minecraftforge.net/maven -> https://bmclapi2.bangbang93.com/maven

Liteloader

http://dl.liteloader.com/versions/versions.json -> https://bmclapi.bangbang93.com/maven/com/mumfrey/liteloader/versions.json

authlib-injector

https://authlib-injector.yushi.moe -> https://bmclapi2.bangbang93.com/mirrors/authlib-injector

Fabric

https://meta.fabricmc.net -> https://bmclapi2.bangbang93.com/fabric-meta https://maven.fabricmc.net -> https://bmclapi2.bangbang93.com/maven

MCBBS Mirror (Faster)

The mcbbs source is a special mirror of BMCLAPI, because the cooperative domain name cannot be bound, so it has to operate as an independent domain name, its directory structure and API content provided are exactly the same as BMCLAPI. Replace the domain of BMCLAPI https://bmclapi2.bangbang93.com with https://download.mcbbs.net will do.

alex3236 commented 3 years ago

Also, I think it is possible to provide a way to customize the download source using config files. Of course, proxy supporting is also a good way to go.

aaronliu0130 commented 3 years ago

I suggest supporting multi-connection download like how aria2 does(i.e. split a big file into multiple chunks and use parallel downloads for all of them OR download multiple files at once)

Ommina commented 3 years ago

I'm horrified at the very notion of unofficial mirrors being used in any capacity.

Even ignoring (which I can't) the security considerations, surely this flies in the face of the "Do Not Distribute" licensing.

aaronliu0130 commented 3 years ago

I'm horrified at the very notion of unofficial mirrors being used in any capacity.

Even ignoring (which I can't) the security considerations, surely this flies in the face of the "Do Not Distribute" licensing.

For your security considerations, the mirrors only mirror what's on launcher.mojang.com, so they are as secure as the official downloads. As for the "Do Not Distribute licensing", you can refer to the official Minecraft EULA.. Yes it does violate the EULA, Mojang can wish to take it down any time it wants. However Mojang is lazy(see all the p2w servers out there). The only type of mirror that won't violate the EULA would probably be proxies. You should be safe if you're only a user who purchased Minecraft downloading Minecraft from the unofficial non-proxy mirrors.

Madis0 commented 3 years ago

If the url swap is indeed that easy, couldn't OP just do it in their hosts file? I also would not recommend unofficial mirrors, at least until there is a way to verify them (think Linux and APT etc).

alex3236 commented 3 years ago

I don't recommend using a third party mirror. A better solution would be to support downloading through a proxy.