From 4df8f70156cfdb2be4329739e014f2affe12d361 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Wed, 6 Jan 2021 13:29:30 -0500 Subject: [PATCH] Rename proxy-protocol setting to haproxy-protocol to make it clearer this is for HAProxy. --- .../velocitypowered/proxy/config/VelocityConfiguration.java | 6 +++++- proxy/src/main/resources/default-velocity.toml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/config/VelocityConfiguration.java b/proxy/src/main/java/com/velocitypowered/proxy/config/VelocityConfiguration.java index 5660b913e..5f849ff47 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/config/VelocityConfiguration.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/config/VelocityConfiguration.java @@ -646,7 +646,11 @@ public class VelocityConfiguration implements ProxyConfig { this.loginRatelimit = config.getIntOrElse("login-ratelimit", 3000); this.connectionTimeout = config.getIntOrElse("connection-timeout", 5000); this.readTimeout = config.getIntOrElse("read-timeout", 30000); - this.proxyProtocol = config.getOrElse("proxy-protocol", false); + if (config.contains("haproxy-protocol")) { + this.proxyProtocol = config.getOrElse("haproxy-protocol", false); + } else { + this.proxyProtocol = config.getOrElse("proxy-protocol", false); + } this.tcpFastOpen = config.getOrElse("tcp-fast-open", false); this.bungeePluginMessageChannel = config.getOrElse("bungee-plugin-message-channel", true); this.showPingRequests = config.getOrElse("show-ping-requests", false); diff --git a/proxy/src/main/resources/default-velocity.toml b/proxy/src/main/resources/default-velocity.toml index 2b54b385b..fe3ad5942 100644 --- a/proxy/src/main/resources/default-velocity.toml +++ b/proxy/src/main/resources/default-velocity.toml @@ -106,7 +106,7 @@ connection-timeout = 5000 read-timeout = 30000 # Enables compatibility with HAProxy. -proxy-protocol = false +haproxy-protocol = false # Enables TCP fast open support on the proxy. Requires the proxy to run on Linux. tcp-fast-open = false