jpenilla / MiniMOTD

Minecraft server/proxy plugin to set the server list MOTD using MiniMessage for formatting, supporting RGB colors.
https://modrinth.com/plugin/minimotd
MIT License
286 stars 32 forks source link

[Feature Request] VirtualHost allow for 'contains with *' #132

Closed ghost closed 7 months ago

ghost commented 1 year ago

Is your feature request related to a problem? Please describe. I am having an issue where I am using TCPShield pointing to the same backend with different domain names. I am trying to set up a virtual host however TCPShield sends requests in as "play.domain.com///127.0.0.1:25565/////:25565`. The random characters make it impossible to designate a selection.

Describe the solution you'd like I would like to be able to change the format for plugin_settings.conf from the following: Format is "hostname:port"="configName|default" to hostname:port or "hostname", having the star representing containing "string match + whatever else".

Describe alternatives you've considered I am not sure of any alternatives.

Additional context

Example output

[05:04:30 INFO] [minimotd-velocity]: [virtual-host-debug] Virtual Host: 'play.polarismc.io///127.0.0.1:25565///1681016669///MGQCMAW5X13a9cF5ysnWdrBLovH4wfVu60l7eBUwWsCI8vw0cuZ9aj+UM7+y1wC//qGHngIwRsCke7eCpO99HTHOVdvZKjx9G0E51ALqRFGWH7kxMhVKYNF2IfMaT1FfbS0/D0du:25565', Selected Config: 'default'
ghost commented 1 year ago

This should be able to be adjusted here https://github.com/jpenilla/MiniMOTD/blob/4ab6567fd22acf7388dfbeb7813980d68339466b/common/src/main/java/xyz/jpenilla/minimotd/common/config/PluginSettings.java#L68 by writing a method to check to check for "domain.com*:port"