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
PaperMC#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 and pull[bot] committed Sep 25, 2024
1 parent 295bc9c commit 84065e9
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 84065e9

Please sign in to comment.