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

HostLocalIp sent to non-local players #165

Closed limejet closed 1 week ago

limejet commented 10 months ago

Bug description

When attempting to join my server which is set up with a public, static IP, I instead get sent the local IP defined by hostLocalIp. This happens even if hostLocalIp is empty, in which case the modpack link my client gets sent is http://:30037. What's more, the config option gets filled in with a local IP (not local to the server, but to my portforward endpoint) on server restart, even if updateIpsOnEveryStart is disabled.

This is with reverseProxy OFF.

Steps to reproduce

  1. Set up server on public IP
  2. edit automodpack-server.json so that localHostIp is empty and updateIpsOnEveryStart is false.
  3. restart server, or reload config
  4. join server from different network

Expected behavior

Automodpack should send the client a public IP.

Actual behavior

Automodpack sends a local IP, which the client can't access.

Relevant logs

[20:21:06] [User Authenticator #1/INFO]: UUID of player <user> is xxxxxx
[20:21:06] [Server thread/INFO]: <user> has installed AutoModpack.
[20:21:06] [Server thread/INFO]: Sending <user> modpack link: http://:30037
[20:21:11] [Netty Epoll Server IO #2/ERROR]: Host server error. AutoModpack host server is down or server is not configured correctly
[20:21:11] [Netty Epoll Server IO #2/WARN]: Please check if AutoModpack host server (TCP) port '30037' is forwarded / opened correctly
[20:21:11] [Netty Epoll Server IO #2/WARN]: If so make sure that host IP '<correct public ip>' and host local IP '' are correct in the config file!
[20:21:11] [Netty Epoll Server IO #2/WARN]: host IP should be an ip which are players outside of server network connecting to and host local IP should be an ip which are players inside of server network connecting to
[20:21:11] [Netty Epoll Server IO #2/WARN]: It can be Ip or a correctly set domain
[20:21:11] [Netty Epoll Server IO #2/WARN]: If you need, change port in config file, forward / open it and restart server
[20:21:12] [Server thread/INFO]: com.mojang.authlib.GameProfile@xxxx[id=xxxx,name=<user>,properties={textures=[com.mojang.authlib.properties.Property@22aa7f2f]},legacy=false] (/172.27.0.1:44762) lost connection: [AutoModpack] Host server error. Please contact server administrator to check the server logs!

Minecraft & Mod Loader versions

1.19.2 Quilt 0.19.3

Minecraft launcher

No response

Operating system

Docker; eclipse-temurin:17-jre (i think it's an ubuntu base image)

AutoModpack version

3.4.4

Other information

Obviously, the interim solution here is to set local and public to the same IP, but that feels weird.

I have not verified that the issue persists in 3.4.5, because i'm affected by #158 and have downgraded to avoid the crashing issue. The checkbox below is lying.

Check list

Skidamek commented 3 months ago

Not sure if its fixed in 4.0.0 but might be