Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-25 07:40:13 +01:00
Hide ip address in initial and legacy connections (#1025)
Dieser Commit ist enthalten in:
Ursprung
00ef92bc5c
Commit
de57563eab
@ -236,7 +236,12 @@ public class HandshakeSessionHandler implements MinecraftSessionHandler {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[legacy connection] " + this.getRemoteAddress().toString();
|
||||
boolean isPlayerAddressLoggingEnabled = connection.server.getConfiguration()
|
||||
.isPlayerAddressLoggingEnabled();
|
||||
String playerIp =
|
||||
isPlayerAddressLoggingEnabled
|
||||
? this.getRemoteAddress().toString() : "<ip address withheld>";
|
||||
return "[legacy connection] " + playerIp;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -75,7 +75,12 @@ public final class InitialInboundConnection implements VelocityInboundConnection
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[initial connection] " + connection.getRemoteAddress().toString();
|
||||
boolean isPlayerAddressLoggingEnabled = connection.server.getConfiguration()
|
||||
.isPlayerAddressLoggingEnabled();
|
||||
String playerIp =
|
||||
isPlayerAddressLoggingEnabled
|
||||
? connection.getRemoteAddress().toString() : "<ip address withheld>";
|
||||
return "[initial connection] " + playerIp;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren