Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual Hosts are not working correctly #16

Closed
Samistine opened this issue Oct 17, 2015 · 4 comments
Closed

Virtual Hosts are not working correctly #16

Samistine opened this issue Oct 17, 2015 · 4 comments

Comments

@Samistine
Copy link

Bungeecord's Forced Hosts allow pinging to different backend servers depending on the hostname you are using to connect eg creative.exampl.com survival.exampl.com

@samerton
Copy link
Member

NamelessMC uses an external library to query servers (found here). I'm not entirely sure how the forced hosts work; I've added a resolver to the query to determine where a domain is pointing, however if there's still no luck it may be worth creating an issue over in the query's issue tracker.

@Samistine
Copy link
Author

It's similiar to Apache's virtual hosts, or any shared hosting platform for that matter. Depending on what hostname is used in the connection/query it determines which server to forward you to. Since your querying with the IP instead of the domain, it won't work correctly.

It looks like the library supports domains, you can simply check the difference of samistine.com vs plotme.samistine.com if you want to quickly see what I mean.

@Samistine
Copy link
Author

Yep, library works perfectly. You just have to query the domain instead.

@samerton
Copy link
Member

In order to allow the query to work with SRV records, I've had to resolve domains to their IP.
If I understand you correctly, the forced hosts won't work with this method, so I'll create a new field within the AdminCP's Minecraft tab to allow users to specify the domain they want to query, alongside the domain they want to show.
I can then drop the SRV resolver, so that whatever the user inputs in the new field (whether it's the IP the SRV record resolves to, or the domain name for forced hosts) is queried.

@samerton samerton added this to the 1.0 milestone Dec 3, 2015
samerton added a commit that referenced this issue Sep 22, 2018
Add a new IP field which the Minecraft server query uses, to prevent
looking up SRV records on the IP to display to the user. Also allows
support for virtual hosts. Closes #16 and #12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants