itzg / mc-router

Routes Minecraft client connections to backend servers based upon the requested server address

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for mods such as Simple Voice Chat requiring extra ports

porl opened this issue · comments

commented

I'm currently running a private server with a few minecraft instances on it. We have tried a few times to get the Simple Voice Chat (and Audioplayer) mod working, however it requires an extra port (24454/udp in this case).

Is there a way to pass through this extra port? I even tried directly exposing the minecraft docker port and pointing the mod client at the server's ip address (though this would mean multiple instances would need different ports hard coded) but no luck.

If this isn't currently possible on mc-router, is it possible to add this support?

Cheers

That's a fair request but there are no plans to support it and never will be.

Routing UDP is quite a bit harder than TCP since there is no protocol support at that level to tie packets/datagrams together for one backend Minecraft server vs another.

This router only comprehends the Minecraft Java edition protocol that runs over TCP. Even then it's just enough to route the initial connection request and after that it just forwards the TCP connection's packets.

If Simple Voice Chat uses stream identifiers at the top of the UDP packets and/or some kind of addressing that can easily identify the backend to route towards then it's in the realm of possibility to implement but that would need to be implemented in some other software. Two or more routers can be used in a system -- perhaps someone has implemented one already for SVC.

commented

Thanks for the answer, that's fair.

I'll keep looking around for solutions. I use Traefik for some websites but couldn't seem to get it working for this. Probably my ignorance though, I'm definitely learning as I go here.

@itzg a possible solution would be to match based on source ip. I know it's not a great solution, would break if multiple connection come from the same ip to separate servers, which I can see happening for example if multiple people in a house are playing on different servers hosted behind the same mc-router

@everyone else I believe SVC allows setting the UDP port on the server side and the minecraft server tells the client which port it's using so a work around would be to use separate udp ports for each server and forward/expose the different udp ports per minecraft instance.

commented

@dazoe I ended up removing mc-router and using minecraft's own ability to use DNS entries to provide "host names" shared on one IP. Then I did basically what you mentioned with SVC and ran each server on its own port.

Not ideal and I preferred using mc-router, but at least I got the servers running for now.