Skidamek / AutoModpack

Enjoy a seamless modpack installation process and effortless updates with a user-friendly solution that simplifies management, making your gaming experience a breeze.
https://modrinth.com/mod/automodpack
GNU Lesser General Public License v3.0
90 stars 29 forks source link

Possibility of using an external web host #232

Open murayuki opened 2 months ago

murayuki commented 2 months ago

Motivation

I would like to disable the http service and use an external web host to host it.

Possible benefits:

  1. avoid using internal http service, reduce the load on Minecraft servers (e.g. dynmap has such a method)
  2. some hosts may not be able to use it, but it may be possible to use
  3. using nginx or apache or any web host can use cdn on the domain (cloudflare etc)

these are the only possibilities that come to mind at the moment

Description

While most mods are downloaded via modrinth or curseforge, in cases where they cannot be downloaded via modrinth or curseforge, they are also downloaded via internal http services. This includes the automodpack-content.json content. and downloads the files in the host-modpack directory.

Is it possible to use nginx or apache or any web host to access automodpack-content.json and host-modpack files etc.?

Example: Turn off the generateModpackOnStart option. And add the option to disable the internal http service. Then run the /automodpack generate command manually. Upload the generated automodpack-content.json and mods files to nginx or apache or any web host.

The files can also be accessed via domain name instead of IP. If possible, I would like to have https connections. For example, https://example.com/automodpack/modpacks/ModPacks_Name.

Other information

No response

etncc commented 2 months ago

To add to this it would be awesome to be able to disable the http service and then to have the ability to add urls to the mods list directly so that people could get the mods without needing to run the http service. Even if this feature could only support modrinth or curseforge it would still be awesome. Though github as well would be nice.

Skidamek commented 2 months ago

To add to this it would be awesome to be able to disable the http service and then to have the ability to add urls to the mods list directly so that people could get the mods without needing to run the http service. Even if this feature could only support modrinth or curseforge it would still be awesome. Though github as well would be nice.

@etncc Actually with default config it kinda works already like this because, by default you don't run separate new http host process, it injects into already running minecraft network io, and just reply's to automodpack requests. Client also fetches all mods/shaders/resourcepacks to get links from modrinth/curseforge, which makes server side super lightweigh. (but currently there is issue that client sometimes does not downloads from modrinth/curseforge even if it finds the file...)

Leialoha commented 2 months ago

Will the server download the modpack from an external page automatically or do you have to continue to update the server side "modpack"?

Skidamek commented 2 months ago

Will the server download the modpack from an external page automatically or do you have to continue to update the server side "modpack"?

You have to update, on server you are making the "modpack" by having the files you want to have in it. AutoModpack generates metadata file of your "modpack" (automodpack-content.json) which is always send to clients who they then compare with their files. But before client starts download process, it tries to fetch as most as possible links to modpacks' mods/shaders/resourcepacks from modrinth/curseforge, then it downloads everything, if something fails or file isn't found on modrinth/curseforge, it downloads it from host server.