
消除针对字面量 IP 服务器地址的反向 DNS 查找延迟
从 TweakerMore 模组中的 yeetServerIpReversedDnsLookup 选项提取
功能与原理
对于仅由字面量 IP 表示的服务器(例如 192.168.2.10:25565),禁用对应 InetAddress 对象中的反向 DNS 查找
许多非回环 IP 没有关联的域名,这会导致反向查找耗时过长
// java.net.InetAddress#getHostName(boolean)
String getHostName(boolean check) {
if (holder().getHostName() == null) { // 如果 InetAddress.getByName() 接收到的是字面量 IP,此处将为 null
holder().hostName = InetAddress.getHostFromNameService(this, check); // <-- 极其耗时
}
return holder().getHostName();
}
此选项将此类服务器的域名直接设置为它们的 IP 地址,从而绕过反向 DNS 检查
对于使用字面量 IP 地址的服务器,可将时间减少约 1~5 秒。影响以下场景:
- 在服务器列表界面中 ping 服务器
- 连接到服务器
运行环境
- 仅限客户端
- Fabric / Forge / NeoForge 加载器模组。无需额外依赖

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
下载 Fast IP Ping
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fast IP Ping
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fast IP Ping
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fast IP Ping
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fast IP Ping
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fast IP Ping
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fast IP Ping
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fast IP Ping
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fast IP Ping
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fast IP Ping
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
- MC 26.2 && MC 26.3
构建信息
- 文件名:
fast-ip-ping-v1.0.12-mc1.21.11-neoforge.jar - SHA-256:
21244d6f2cfb6569ddc6c2ae29ecd2b43a1fd014419b59f672168e8be7f1d768 - 构建来源:
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
评论 0
登录后参与评分
还没有评论,来抢沙发吧