haveachin / infrared

An ultra lightweight minecraft reverse proxy and idle placeholder
https://infrared.dev
GNU Affero General Public License v3.0
745 stars 60 forks source link

MOTD "passthrough" #119

Open daniwasonline opened 2 years ago

daniwasonline commented 2 years ago

Is your feature request related to a problem? Please describe. I can't properly use dynamic MOTD solutions with Infrared.

Describe the solution you'd like A "passthrough" feature. Infrared would take the MOTD of the backend, and it would then use said MOTD for the frontend proxy.

Describe alternatives you've considered I've created various scripts and utilities in the past that use the backend server's MOTD for the proxy's configuration. None of these solutions have worked well, due to handicaps with decoding HAProxy-wrapped responses from the backend server.

haveachin commented 2 years ago

You'd only like the MOTD to passthrough while all other online status properties are overridden?

daniwasonline commented 2 years ago

Preferably, yes. If not, passing through other status properties can also work.

GoodLucky777 commented 1 year ago

@haveachin Is there way to do this with Bedrock edition?

haveachin commented 1 year ago

No, currently it is not possible to pass the MOTD through in Bedrock. Server list pings are totally different in Bedrock than they are in Java, since Bedrock uses RakNet on top of the UDP protocol to communicate. For whatever reason, Mojang/Microsoft decided that it would be a good idea to use RakNets build in ping mechanism to implement server list pings. The problem now is that the RakNet implementation does not communicate what FQDN was uses to reach the server, which makes it impossible to pass the right MOTD through to the client. So you can only have one MOTD per port due to how the Bedrock protocol works.

GoodLucky777 commented 1 year ago

Although I can only show one MOTD per port in Bedrock, can you add config to set which server's MOTD to passthrough for all FQDNs?

haveachin commented 1 year ago

I'll look into adding that

vniehues commented 1 year ago

I just wanted to "+1" the idea of having a separate motd option. I'd like to leave everything on default (basically minimum config) but still change the motd :)