ServerAddressSpaceFix

Fix the "unknown host" bug when adding a server or connecting directly to a server with a space at the end of the server address

von
147.8K Downloads
fabricoptimization
Kompatiblen Minecraft Server konfigurieren

Über diese Mod

Note: This document was originally written in Chinese and translated to other languages by AI. If possible, I recommend reading the original Chinese document instead of a translated version.
简体中文(GitHub)     简体中文(Gitea)     English(GitHub)     English(Gitea)

Introduction

This mod is intended to fix a bug that was reported on November 26, 2021 and still has not been fixed.
Bug tracker link

Features

If the server address you enter on the "Add Server" or "Direct Connect" screen contains spaces at the beginning, the end, or in the middle, this mod will automatically remove them.
This prevents the "Unknown Host" bug mentioned above.

Why this mod exists
        A few months ago, I wanted to play on a server. I copied the address from the server's official website, pasted it into the "Server Address" field, saved it, and unexpectedly got an "Unknown Host" error.
        No panic, this was obviously DNS failing to resolve the corresponding address. Let's try pinging it first.
        Ping could resolve the domain name to an address, and then I suspected the Great Firewall might be doing something again, so I used a tool from ZhanZhangJia to test it. The results were exactly the same as mine.
        That was rather strange.
        Then, after fiddling with it for a while, I found the problem.
        There was a space at the end of the server address I copied.
        That was pretty hard to accept. After continuing to tinker for a while and confirming that the problem could be reproduced reliably, I submitted a bug report to the tracker.
        And guess what?
        The issue I filed on the bug tracker
        The comment below
        An earlier bug report
        My English is completely terrible, so I did not continue talking about it. The issue description was written using a translator.
        But honestly, I felt this was kind of absurd.
        Since your address is a String, how hard could it be to call trim on it afterwards?
        Also, as a player, when you tell me, "This was your own carelessness, so it does not even count as a bug," I cannot accept that.
        So, this mod was born.
    

Configuration file

  • If you have version isolation enabled, it should be located at .minecraft\versions\<version name>\config\ServerAddressSpaceFix.json5
  • If you do not have version isolation enabled, it should be located at .minecraft\config\ServerAddressSpaceFix.json5

This is just a regular JSON text file, except that JSON5 supports additional features such as comments.
All properties include comments, covering things such as functionality, value ranges, types, default values, and more.
You can edit it with a normal text editor.
You can even edit the configuration file while the game is running; it will be applied automatically after saving.

Known issues

All known issues have been fixed. If you find any new ones, please let me know.
If anyone is willing to help fix a bug, PRs are welcome ╰(°▽°)╯

License

I use the even more aggressive WTFPL than MIT.

Verfügbare Versionen

ServerAddressSpaceFix 0.2.5release
MC 26.1, 26.1.1, 26.1.2, 26.2fabric
17. Juni 2026
ServerAddressSpaceFix 0.2.4release
MC 26.1, 26.1.1, 26.1.2, 26.2fabric
17. Juni 2026
ServerAddressSpaceFix 0.2.3release
MC 26.1, 26.1.1, 26.1.2fabric
4. Juni 2026
ServerAddressSpaceFix 0.2.2release
MC 26.1, 26.1.1, 26.1.2fabric
26. März 2026
ServerAddressSpaceFix 0.2.1release
MC 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11fabric
30. Oktober 2024

ServerAddressSpaceFix auf deinem Client installieren

1

Mod-Loader lokal installieren

Installiere fabric für deine lokale Minecraft-Version.

2

Passende Datei herunterladen

Wähle die ServerAddressSpaceFix-Datei für fabric und Minecraft 26.2.

3

Mod installieren

Lege die .jar-Datei in deinem lokalen .minecraft/mods-Ordner ab und starte Minecraft neu. Eine Installation auf dem Server ist nicht nötig.

Kompatibilität

Mod-Loader

fabric

Minecraft-Versionen

26.2, 26.1.2, 26.1.1 (+20 weitere)

Server-seitig

Nicht unterstützt

Empfohlener RAM

4 GB(min. 3 GB)

Häufige Fragen

Muss ServerAddressSpaceFix auf dem Minecraft Server installiert werden?

Nein. Modrinth kennzeichnet ServerAddressSpaceFix serverseitig als nicht unterstützt. Installiere die Mod nur im lokalen Minecraft-Mods-Ordner. Dein Server kann unverändert bleiben, sofern die Mod-Seite keine zusätzliche Abhängigkeit nennt.

Welche Version und welchen Loader braucht ServerAddressSpaceFix?

Nutze eine Datei für fabric und exakt deine Minecraft-Version. Unterstützte Versionen sind unter anderem 26.2, 26.1.2, 26.1.1. Loader-Dateien sind nicht untereinander austauschbar.

ServerAddressSpaceFix funktioniert nicht – was kann ich prüfen?

Prüfe zuerst Minecraft-Version, Loader-Version und erforderliche Abhängigkeiten. Lege die .jar-Datei im lokalen .minecraft/mods-Ordner ab und entferne ältere Duplikate. Da die Mod clientseitig ist, löst mehr Server-RAM dieses Problem nicht.

Minecraft Server für deine Gruppe

ServerAddressSpaceFix bleibt auf deinem Client. Hoste dazu eine kompatible Welt für deine Mitspieler.

Empfohlener RAM
4 GBab €5.2/Monat
Min. 3 GB | +1 GB pro 8 Spieler
Jetzt Server erstellen
Client-Kompatibilitätsanleitung
NVMe SSD Speicher
DDoS-Schutz inklusive

Details

Lizenz
Do What The F*ck You Want To Public License
Server-seitig
Nicht unterstützt

Unterstützte Versionen

26.226.1.226.1.126.11.21.111.21.101.21.91.21.81.21.71.21.6+13 mehr