PaperMC / Velocity

The modern, next-generation Minecraft server proxy.
https://papermc.io/software/velocity
GNU General Public License v3.0
1.79k stars 631 forks source link

Hostname/IP validation is too strict #1031

Open RaphiMC opened 1 year ago

RaphiMC commented 1 year ago

If I want to use raphimc.net_25564_1.8.x.viaproxy.127-0-0-1.nip.io:25568 as a hostname for my backend server in the velocity config it complains that the address is not valid. Pinging raphimc.net_25564_1.8.x.viaproxy.127-0-0-1.nip.io in cmd resolves to localhost as it should. The reason I want to use such a long hostname is to pass on information (Through the address in the handshake packet) to the "backend server" (Another proxy) to know where to connect to. Trying to connect to that address with a minecraft client works fine.

RaphiMC commented 1 year ago

Bungeecord has the same issue: https://github.com/SpigotMC/BungeeCord/issues/3480

electronicboy commented 1 year ago

I mean, you're breaking the hostname spec, I guess we probably should relax this a little, but, idk what extra chars we allow people to break the spec with

RaphiMC commented 1 year ago

Which of the characters breaks the hostname spec?

electronicboy commented 1 year ago

_

On Wed, 28 Jun 2023, 08:54 RK_01, @.***> wrote:

Which of the characters breaks the hostname spec?

— Reply to this email directly, view it on GitHub https://github.com/PaperMC/Velocity/issues/1031#issuecomment-1610941266, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJMAZGDIA64DQEP4UZQMODXNPPKTANCNFSM6AAAAAAZWSGC24 . You are receiving this because you commented.Message ID: @.***>

RaphiMC commented 1 year ago

Just tried, even browsers accept _ in the URLs. So I think it should be relaxed even tho its not strictly per spec

electronicboy commented 1 year ago

Yes, that's what I'm saying, I just have no idea what extra characters we allow

On Wed, 28 Jun 2023, 09:05 RK_01, @.***> wrote:

Just tried, even browsers accept _ in the URLs. So I think it should be relaxed even tho its not strictly per spec

— Reply to this email directly, view it on GitHub https://github.com/PaperMC/Velocity/issues/1031#issuecomment-1610957128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJMAZDOCLLKH5XOTGXWW3DXNPQVJANCNFSM6AAAAAAZWSGC24 . You are receiving this because you commented.Message ID: @.***>