Aelysium-Group / rusty-connector

A player and server connection manager for Velocity based Minecraft Networks!
GNU General Public License v3.0
77 stars 17 forks source link

RC using Docker ContainerID as Hostname #58

Closed phaefner1 closed 6 months ago

phaefner1 commented 9 months ago

Hi, I have a Problem with my Setup:

Setup: 2 VPS, on VPS1 (master) the RC / Velocity Proxy is running. On VPS2 (worker1) i have a MC Server in Docker, also running RC as Client.

The dockerized server on worker1 is able to connect to the proxy using its container ip address. Since the 2 VPS share the Network, they can reach (ping, telnet) each other.

rc2

In the "address" field in the client config i put the correct ip address, but RC resolves this IP to the docker container id and registers the Server as :25565 on the proxy, making it impossible to connect to it.

rc3

rc1

This is also reproducable if u just have 1 VPS with a proxy and a mc server running in docker that connects to the proxy. Screenshots attached.

If i add the docker containerid to my /etc/hosts file and make it resolve to the ip again, everything works fine. But thats just a silly workaround and not what i want, since i want my setup to be flexible and scale.

nathan-i-martin commented 9 months ago

I've been reviewing the code for Velocity. It looks like AddressUtil.parseAddress is used to parse the address used by the server registration, where in RC we're using parseAndResolve. I'm going to be changing this so hopefully that should fix this issue.

nathan-i-martin commented 6 months ago

Potential fix has been made in branch v0.7.2. I don't have a docker setup, if someone could test it can get back to me on that, that'd be awesome. CC @phaefner1