Closed MonsterDruide1 closed 1 year ago
Update: Hardcoding the IP to servers manually is not really a solution, as those get rotated more quickly than I'm willing to update manually.
Update: Hardcoding the IP to servers manually is not really a solution, as those get rotated more quickly than I'm willing to update manually.
indeed, it led me back in Dec 2021 to use Java's InetAdress to get the IP address (https://github.com/Pugmatt/BedrockConnect/pull/249/commits/fc4e2ecfb703ed04d4b07a025ddf99ba891633a5). The problem probably could be fixed by using an library that can configured to allways force it through a custom dns server.
I just simply lacked the java knowledge. I didn’t know how to use maven and stuff at that time.
Yes, something like this would be the solution - as pointed out by the line I linked above, this should also be done for domains fetched from the config file. I just haven't gotten around to implement something like this myself, so if you have the time for it feel free to just wrap this in a check+domain resolution.
The main problem isn't even trying to get around the DNS, as the code linked above is being executed on the server hosting the DNS - so it doesn't get resolved by the spoofed DNS, but the right one the hosting server uses, meaning it gets resolved to the right server here. What's currently happening is that the domain name is being sent to the client (Minecraft), which tries to look up the domain to IP itself - and in turn gets caught by the DNS again, as "intended". Just checking for the "address", see if it is a domain or IP and resolving it in this program before sending it to the client will totally solve this issue.
Latest release, 1.33, should now allow this to be possible. In your BedrockConnect launch command, add the argument fetch_ips=true
.
Yes, this works just like expected. Thanks for taking the time to implement it!
What happened?
Short version: When using the hostname of a featured server in the
custom_servers.json
, the client gets redirected to the server selection screen again.Long version: I want to only add a subset of featured servers to the custom server list, along with some new ones. However, using the hostname of the featured server in the server list means that the client will resolve the hostname to IP again, getting caught by the DNS setup, and being redirected to the server list - again.
Expected Behaviour?
The client should be sent to the expected server instead.
Steps to reproduce.
custom_servers.json
containing for example "Mineplex", with the address pointing towardsmco.mineplex.com
.Screenshots/Videos
-
Minecraft Bedrock Version
(doesn't matter)
Console
(doesn't matter)
Additional Context
I'd see the issue in the following line: https://github.com/Pugmatt/BedrockConnect/blob/38a7a369963ed3430a5b13ffbd56c94fb7394203/serverlist-server/src/main/com/pyratron/pugmatt/bedrockconnect/listeners/PacketHandler.java#L140
Here, the client just gets sent a transfer packet pointing to the address listed in the
json
config file. It would be better if this could be resolved by the BedrockConnect server first, allowing to resolve domains blocked by the DNS, then only sending the IP to the client.The issue can currently be worked around by hardcoding the IP to the servers instead, but ... that's cheating.