Skip to content

Commit

Permalink
Adjust HAProxy's existance to log when the proxy protocol is enabled … (
Browse files Browse the repository at this point in the history
#1436)

* Adjust HAProxy's existance to log when the proxy protocol is enabled during bind.

* Added additional warning message, instead of changing the main one. We can see what the preference would be.
  • Loading branch information
Codixer authored Sep 23, 2024
1 parent b66aa3f commit ef1f500
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ public void bind(final InetSocketAddress address) {
final Channel channel = future.channel();
if (future.isSuccess()) {
this.endpoints.put(address, new Endpoint(channel, ListenerType.MINECRAFT));

// Warn people with console access that HAProxy is in use, see PR: #1436
if (this.server.getConfiguration().isProxyProtocol()) {
LOGGER.warn("Using HAProxy and listening on {}, please ensure this listener is adequately firewalled.", channel.localAddress());
}

LOGGER.info("Listening on {}", channel.localAddress());

// Fire the proxy bound event after the socket is bound
Expand Down

0 comments on commit ef1f500

Please sign in to comment.