From bfe2358386d4d5e8e41ab89079a334d1942edaf9 Mon Sep 17 00:00:00 2001 From: mdxd44 <67416904+mdxd44@users.noreply.github.com> Date: Wed, 1 Sep 2021 18:03:49 +0900 Subject: [PATCH] Fix legacy handshake with hostnames that include IP addresses (#571) --- README.md | 2 +- .../proxy/connection/backend/VelocityServerConnection.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f665aaa5..9ae0ce25 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Velocity -[![Build Status](https://img.shields.io/jenkins/s/https/ci.velocitypowered.com/job/velocity.svg)](https://ci.velocitypowered.com/job/velocity/) +[![Build Status](https://img.shields.io/jenkins/s/https/ci.velocitypowered.com/job/velocity.svg)](https://ci.velocitypowered.com/job/velocity-3.0.0/) [![Join our Discord](https://img.shields.io/discord/472484458856185878.svg?logo=discord&label=)](https://discord.gg/8cB9Bgf) A Minecraft server proxy with unparalleled server support, scalability, diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/VelocityServerConnection.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/VelocityServerConnection.java index 62be4a34..0c2dc600 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/VelocityServerConnection.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/VelocityServerConnection.java @@ -122,7 +122,7 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation, .orElseGet(() -> registeredServer.getServerInfo().getAddress()) .getHostString()) .append('\0') - .append(proxyPlayer.getRemoteAddress().getHostString()) + .append(proxyPlayer.getRemoteAddress().getAddress().getHostAddress()) .append('\0') .append(proxyPlayer.getGameProfile().getUndashedId()) .append('\0');