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

SLP Virtual Hosts | Non-functional with SRV, or proxied records #326

Open
MackenzieMolloy opened this issue Feb 25, 2021 · 8 comments
Open

Comments

@MackenzieMolloy
Copy link

Virtual Host (MOTD) doesn't work when the domains are either setup with SRV records or proxied through a service such as Cloudflare.

I did notice there was an issue from 2015 about this, and how it's almost impossible to add, but maybe have a look at DomainAnalysis which tracks domain usage perfectly... not sure if there is any difference between a ping, and a connection.
https://www.spigotmc.org/resources/domainanalytics.81585/ <-- They also provide the source code via GitHub Repo.

@stephan-gh
Copy link
Member

AFAICT they just use getVirtualHost(): https://github.com/FlowZz99/DomainAnalytics/blob/53db0536aaba1bd564141fe0c0a635788212e71d/src/main/java/it/flowzz/domainanalytics/listeners/PlayerLoginEventListener.java#L37

which is the same I use:

So I would expect it to return the same values.

@MackenzieMolloy
Copy link
Author

MackenzieMolloy commented Feb 25, 2021

Odd, could the difference be that with SLP - it's a "ping" and DomainAnalysis is for connections to the server?

As when I enable proxied, or use a SRV record - the MOTD is that set to the personalise/description default.

Hosts:
mc.frozenwaters.net:
Default:
Description:
- |-
&3&l Frozen&b&lWaters &7[1.8 - 1.16]
&c We're back, bigger and better than before!
play.frozenwaters.net:
Default:
Description:
- |-
&3&l Frozen&b&lWaters &7[1.8 - 1.16] 2
&c We're back, bigger and better than before!

Default:
Description:

  • |-
    &3&l Frozen&b&lWaters &7[1.8 - 1.16]
    &c We're back, bigger and better than before!
  • |-
    &3&l Frozen&b&lWaters &7[1.8 - 1.16]
    &c We're back, bigger and better than before!
    Players:
    Hover:
    • |-
      &3&l Frozen&b&lWaters &7[1.8 - 1.16]
      &c We're back, bigger and better than before!
      Personalized:

Description:

  • |-
    &3&l Frozen&b&lWaters &7[1.8 - 1.16]
    &c We're back, bigger and better than before!
  • |-
    &3&l Frozen&b&lWaters &7[1.8 - 1.16]
    &c We're back, bigger and better than before!
    Players:
    Hover:
    • |-
      &3&l Frozen&b&lWaters &7[1.8 - 1.16]
      &c We're back, bigger and better than before!

@stephan-gh
Copy link
Member

Odd, could the difference be that with SLP - it's a "ping" and DomainAnalysis is for connections to the server?

It seems unlikely but it is possible. In any case, I'm sure that SLP is making use of all the information that is available. If it's not working it seems to be a limitation of the protocol.

What I mentioned in #52 (comment) probably still applies - if you are making use of SRV records you need to match the destination hostname of the SRV in the virtual hosts.

@MackenzieMolloy
Copy link
Author

Ah, yes. I got it working (using play instead of play.domain.net) ... might be useful if you could specify that on the wiki. As I myself was thinking with SRV records - it was the full domain.

@stephan-gh
Copy link
Member

Ah, yes. I got it working (using play instead of play.domain.net) ... might be useful if you could specify that on the wiki. As I myself was thinking with SRV records - it was the full domain.

Sorry, now I'm confused. play isn't a real domain... Could you explain how you set up the SRV/... whatever records?

@MackenzieMolloy
Copy link
Author

In the config I sent above, I replaced "play.frozenwaters.net" with "play" and that made it work. I'm using a unproxied A record along with a SRV record.

@stephan-gh
Copy link
Member

But the SRV record doesn't point to play I assume? Not sure why the end of the domain suddenly disappears...

@MackenzieMolloy
Copy link
Author

This is how I have my records setup;

A Record
image

SRV
image

@stephan-gh stephan-gh modified the milestone: 3.5.0 May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants