Velocity icon indicating copy to clipboard operation
Velocity copied to clipboard

Hostname/IP validation is too strict

Open RaphiMC opened this issue 2 years ago • 7 comments

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 avatar Jun 28 '23 06:06 RaphiMC

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

RaphiMC avatar Jun 28 '23 07:06 RaphiMC

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

electronicboy avatar Jun 28 '23 07:06 electronicboy

Which of the characters breaks the hostname spec?

RaphiMC avatar Jun 28 '23 07:06 RaphiMC

_

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: @.***>

electronicboy avatar Jun 28 '23 08:06 electronicboy

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

RaphiMC avatar Jun 28 '23 08:06 RaphiMC

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: @.***>

electronicboy avatar Jun 28 '23 08:06 electronicboy