
Fast IP Ping
Yeet the laggy reversed DNS lookup for literal IP server addresses
About

Yeet the laggy reversed DNS lookup for literal IP server addresses
Extracted from the yeetServerIpReversedDnsLookup option in TweakerMore Mod
What & Why & How
For servers whose addresses are represented solely by a literal IP, e.g. 192.168.2.10:25565, disable reverse DNS lookups in the corresponding InetAddress object
Many non-loopback IPs lack associated domain names, which makes reverse lookups time-consuming
// java.net.InetAddress#getHostName(boolean)
String getHostName(boolean check) {
if (holder().getHostName() == null) { // It will be null if InetAddress.getByName() received a literal IP
holder().hostName = InetAddress.getHostFromNameService(this, check); // <-- takes forever
}
return holder().getHostName();
}
This option sets the domain of those servers directly to their IP, bypassing the reverse DNS check
This results in a 1s ~ 5s reduction in time for servers with literal IP address. Affects the following environments:
- Pinging the server in the server list screen
- Connecting to the server
Environment
- Client-side only
- Fabric / Forge / NeoForge mod loader. No extra requirement is needed
Versions
- MC 1.21.11 support - Migrated from yarn to mojmap ------- Build Information - File name: `fast-ip-ping-v1.0.8-mc1.21.4-neoforge.jar` - SHA-256: `55be69ab921cd28d10f007dde41bcd3b9bff1f01bca12d40004e833a08267ebf` - Built from: https://github.com/Fallen-Breath/fast-ip-ping/actions/runs/20110605565
- MC 1.21.11 support - Migrated from yarn to mojmap ------- Build Information - File name: `fast-ip-ping-v1.0.8-mc1.18.2-forge.jar` - SHA-256: `445d1d92c3b579d194e192152017430933602e2e60be6149cd259438e6eccce0` - Built from: https://github.com/Fallen-Breath/fast-ip-ping/actions/runs/20110605565
- MC 1.21.11 support - Migrated from yarn to mojmap ------- Build Information - File name: `fast-ip-ping-v1.0.8-mc1.21.3-forge.jar` - SHA-256: `afd4c05f00bc60867c04478073e1f701b98d189c0ed80cc974ba3a0407131296` - Built from: https://github.com/Fallen-Breath/fast-ip-ping/actions/runs/20110605565