Skip to content

[Feature Request] Wildcard Forced Host Support #1587

Description

@JosTheDude

Requested Feature

Make the [forced-hosts] domains support wildwards (ie. *.example.com) rather than having to statically define subdomains (play.example.com)

Why is this needed?

Most forced host systems in software allow for wildcard support already and this allows for networks looking to bundle a vast majority of subdomains for different IPs into singular wildcards.

For example, this is my current setup without wildcards:

[forced-hosts]
# Configure your forced hosts here.

# Soul Realms
"play.soulrealms.net" = ["soulrealms-smp-1" ]
"yt.soulrealms.net" = [ "soulrealms-smp-1" ]
"ip.soulrealms.net" = [ "soulrealms-smp-1" ]
"soulrealms.net" = ["soulrealms-smp-1" ]
"soulrealms.minehut.gg" = [ "soulrealms-smp-1" ]

# Misc PvP
"play.miscpvp.org" = [ "miscpvp-gens-1" ]
"yt.miscpvp.org" = [ "miscpvp-gens-1" ]
"miscpvp.org" = [ "miscpvp-gens-1" ]
"ip.miscpvp.org" = [ "miscpvp-gens-1" ]
"miscpvp.minehut.gg" = [ "miscpvp-gens-1" ]

This discourages IP-based join tracking and forces players to be sent to a hub server rather than forwarded directly if their IP differs from the configured list. With wildcards, this would become:

[forced-hosts]
# Configure your forced hosts here.

# Soul Realms
"*.soulrealms.net" = [ "soulrealms-smp-1" ]
"soulrealms.net" = ["soulrealms-smp-1" ]
"soulrealms.minehut.gg" = [ "soulrealms-smp-1" ]

# Misc PvP
"*.miscpvp.org" = [ "miscpvp-gens-1" ]
"miscpvp.org" = [ "miscpvp-gens-1" ]
"miscpvp.minehut.gg" = [ "miscpvp-gens-1" ]

Allowing users to use enhanced subdomain tracking without sending someone to an arbitrary hub server due to not knowing where to forward the player.

Alternative Solutions

Only alternative solution is to manually define each and every potential subdomain a player could join with, which can be clunky and bolsters line count significantly.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions