-
Notifications
You must be signed in to change notification settings - Fork 99
[Bug]: Minecraft eggs should not force enable-query=true in server.properties, but should set query.port #22
Description
Panel Version
1.11.7
Wings Version
1.11.13
Service
Minecraft
Modified
No, I did not modify the egg
Expected Behavior
I'm using the Fabric egg, but various other Minecraft eggs seem to have the same issue.
I expect to be able to disable Minecraft's query service for privacy reasons. Moreover, if I choose to leave the query service enabled, I expect it use the port number from the server's primary allocation. (The query service listens on UDP, whereas Minecraft itself listens on TCP.)
Actual Behavior
The various indicated Minecraft eggs are configured to force enable-query=true in the server.properties file every time the server is started. This prevents the egg's user from setting enable-query=false manually since it will be overwritten on every server startup. Essentially, this forces the query service to be enabled, which people may expose information about the server that's not intended (e.g., to sites like https://mcsrvstat.us/, as well as folks who run bots scanning for servers).
Additionally, if I did want the query service enabled, it still wouldn't work for me since the egg config does not set query.port to the port allocated in the panel, but rather leaves it the default (25565). Since I run Minecraft on a non-default port number, the query port won't actually be forwarded into the container if I did want it.
Steps To Reproduce
When trying to disable the query service:
- Install any of the various Minecraft server eggs that forces
enable-query=true. - Manually edit
server.propertiesto setenable-query=falseand restart the server. - Observe that
enable-queryhas been set back to true.
When trying to use the query service with a non-default port number:
- Install any of the various Minecraft server eggs mentioned above
- Assign the server a port allocation that's not the default (25565).
- Observe that the query service is configured to listen on the default port rather than the allocated port, so even those it's forced on, it isn't actually accessible outside the container.
IMO, it makes sense to change the various egg configs that look like
{
"server.properties": {
"parser": "properties",
"find": {
"server-ip": "0.0.0.0",
"enable-query": "true",
"server-port": "{{server.build.default.port}}"
}
}
}
to something like this instead:
{
"server.properties": {
"parser": "properties",
"find": {
"server-ip": "0.0.0.0",
"server-port": "{{server.build.default.port}}",
"query.port": "{{server.build.default.port}}"
}
}
}
That way, the server owner can enable or disable the query service as they see fit, but if they do want it enabled, the query service will automatically listen on the correct (allocated) port.
Install logs
N/A