Unresolved `InetAddress` if using hostname in `[servers]` section of configuration
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 959
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 2
Description
Expected Behavior
It should resolve hostnames (e.g., localhost -> ::0) as the other program does.
Actual Behavior
It now has an unresolved InetAddress.
Steps to Reproduce
- Add
exampleserver = 'some-hostname-that-should-resolve-by-dns:25565'in[servers]section ofvelocity.toml. - Try to access the
ServerInfo#getAddress()ofexampleservervia any plugins in Velocity. - We have an unresolved
InetAddress.
Plugin List
Velocity Version
[15:55:57 INFO]: Velocity 3.5.0-SNAPSHOT (git-d11511c1-b584)
[15:55:57 INFO]: Copyright 2018-2026 Velocity Contributors。Velocity 以 GNU 通用公共许可证第三版授权。
[15:55:57 INFO]: PaperMC - GitHub
Additional Information
Ref: https://github.com/PaperMC/Velocity/blob/d11511c18499497e7f7186211b109ef395b44acd/proxy/src/main/java/com/velocitypowered/proxy/util/AddressUtil.java#L44-L58
Why didn't we always resolve the hostname?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with proxy/src/main/java/com/velocitypowered/proxy/util/AddressUtil.java at lines 44-58, then trace how the [servers] section creates the ServerInfo exposed by ServerInfo#getAddress(). Compare the current behavior with the expected hostname resolution for localhost and DNS names. Done means configured hostnames provide resolved InetAddress values to plugins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100