McLive / api.minetools.eu

Issuetracker for the Minetools API.
2 stars 0 forks source link

After proxying traffic through Cloudflare, ping requests time out #25

Closed EmeraldSnorlax closed 4 years ago

EmeraldSnorlax commented 4 years ago

Hey, I recently made it so my domain (CNAME) has cloudflare proxy requests to it. Now, MineTools seems to timeout on every request to my minecraft server (requests are done from the browser). Both are hosted on the same machine. Both my minecraft server and my website are reachable by people outside of my network. Disabling cloudflare proxying allows requests to be sent and recieved as normal.

Is there any chance this could be fixed?

McLive commented 4 years ago

Hmm, this sounds weird. Can you send me a link to your site so I can check what's going on?

EmeraldSnorlax commented 4 years ago

Here is the link to my site / minecraft server https://snorlax.cc the request happens in bundle.js

What should happen: successful request

Console output:

GEThttps://snorlax.cc/index.css
[HTTP/1.1 304 Not Modified 4ms]

GEThttps://snorlax.cc/bundle.js
[HTTP/1.1 304 Not Modified 3ms]

GEThttps://snorlax.cc/index.css
[HTTP/1.1 304 Not Modified 4ms]

{…}
​
error: "timed out"       // <------ this is the request to MineTools

Hitting this link in the browser also times out (https://api.minetools.eu/ping/snorlax.cc/25565) The minecraft server can still be connected to (snorlax.cc)

McLive commented 4 years ago

I wonder how it's still possible to join since 3 IP's are returned by that A record (2x cloudflare and another one). I don't know how the minecraft client handles that.

# dig snorlax.cc +short
104.31.86.86
172.67.143.151
104.31.87.86

You should probably create an SRV record

EmeraldSnorlax commented 4 years ago

two of those IP adress's are of cloudflare's data centers, which should be expected seeing as traffic is being proxied through them, no?

McLive commented 4 years ago

Yes, but the third one shouldn't be there.

EmeraldSnorlax commented 4 years ago

ah, well. guess i'll move the minecraft server to a different subdomain