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
91 stars 29 forks source link

A way to disable the mod adding the host port to the end of the download link. #149

Closed Norteous closed 11 months ago

Norteous commented 11 months ago

Motivation

When I was setting this up on my server I was unable to port forward it in a way that would work. I was using ngrok and setting the tcp tunnel as the host local ip. Since the ngrok tunnel was forwarding the host port and the mod was adding the same host port on the end, it just gave me an error when my friends tried to join.

Description

Have a way to toggle the host port being added at the end of the download link.

Other information

I also might have just been doing it wrong, if so I am sorry for wasting your time. Also if I am using any terms wrong I am also sorry.

Skidamek commented 11 months ago

Hmm, alright, you probably already have forwarded the same IP address to just connect to Minecraft server so you probably just need to type ngrok url without http/s at start to the hostIp in automodpack server config

Norteous commented 11 months ago

I'm not sure I fully understand. When I put the hostPort into ngrok and then I put that tunnel as the local IP, it puts the hostPort after the tunnel, although the tunnel already has the port in it. (example: tunnel:hostPort) Is there a seperate area I am supposed to put the tunnel?

Skidamek commented 11 months ago

Ah alright gotcha gonna add this in next update probably today

Norteous commented 11 months ago

Thank you for your help.

Skidamek commented 11 months ago

Which loader are you using?

Norteous commented 11 months ago

Fabric 1.20.1

Skidamek commented 11 months ago

Alright done, code is on external-proxies branch. To use, change the AutoModpack jars on server and client to this (zipped because github restrictions, so unzip)

And in server config set reverseProxy to true Forward port from hostPort to ngrok via http not tcp protocol Copy whole ngrok url with https:// to externalModpackLink in config Restart the server and everything should work.

Norteous commented 11 months ago

Seems to work! Thank you for your help.

Skidamek commented 11 months ago

Great, however I will leave it open until I will merge it to main release probably with full 3.4.4