Closed drori200 closed 2 years ago
whats wrong with the host ip resolution? is it a srv record?
whats wrong with the host ip resolution? is it a srv record?
I do not know the cause, it could be a problem with the srv record (although i do not think it is) but what i know is when i had an ip address like the ones of for example "mc.hypixel.net" i could not get a response with it being online while with my implementation i could get both numerical ips and domain ips working
IIRC I wrote replacement code for this specific thing for the v2 branch. I wonder if we can just backport that into v1. I'd like to avoid dependence on 3rd party services if it can be avoided.
https://github.com/dscalzi/HeliosLauncher/blob/ts-refactor/src/common/mojang/net/Protocol.ts https://github.com/dscalzi/HeliosLauncher/blob/ts-refactor/src/common/mojang/net/ServerStatusAPI.ts
Test case available here. https://github.com/dscalzi/HeliosLauncher/blob/ts-refactor/test/mojang/net/ServerStatusAPITest.ts
Can you try achieving what you want with the change I just pushed to master? https://github.com/dscalzi/HeliosLauncher/commit/9c6d75f8121ecc65210fd2c773242e5ac0068ae5
I will try to do so when i get back home in around 5 hours
Alright so now even with numerical IPs the status shows offline
I think the problem could be with the URL module but i don't know enough about it. Some way i can think of is to get the ip address using the DNS module but that still leaves us with the part of finding the port for the server
can you send me an IP that isnt working for you?
can you send me an IP that isnt working for you?
Testing on both a numerical and a domain ip for (each for different server /modpack) 144.217.35.37:25587
and dbc.dbdivinity.com
Neither appears online. SRV records are not supported in the lookup (if these IPs have srv). Support would have to be added here https://github.com/dscalzi/helios-core
Why?: When trying to get the status of domain based ip's with the current implementation you weren't able to do that since you could not resolve the host ip, with this PR i have replaced the old system with a simple request using node-fetch (since Request is deprecated and not maintained for the time being) using the https://api.mcsrvstat.us/ API.