3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-06 00:00:47 +01:00

Add native info to dump

Dieser Commit ist enthalten in:
Andrew Steinborn 2023-01-01 11:30:39 -05:00
Ursprung 118c4b451c
Commit 4ef9a33f4c
2 geänderte Dateien mit 11 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -35,7 +35,7 @@ import io.netty.channel.socket.nio.NioSocketChannel;
import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadFactory;
import java.util.function.BiFunction; import java.util.function.BiFunction;
enum TransportType { public enum TransportType {
NIO("NIO", NioServerSocketChannel::new, NIO("NIO", NioServerSocketChannel::new,
NioSocketChannel::new, NioSocketChannel::new,
NioDatagramChannel::new, NioDatagramChannel::new,

Datei anzeigen

@ -32,6 +32,8 @@ import com.velocitypowered.api.proxy.ProxyServer;
import com.velocitypowered.api.proxy.config.ProxyConfig; import com.velocitypowered.api.proxy.config.ProxyConfig;
import com.velocitypowered.api.proxy.server.RegisteredServer; import com.velocitypowered.api.proxy.server.RegisteredServer;
import com.velocitypowered.api.util.ProxyVersion; import com.velocitypowered.api.util.ProxyVersion;
import com.velocitypowered.natives.util.Natives;
import com.velocitypowered.proxy.network.TransportType;
import java.net.Inet4Address; import java.net.Inet4Address;
import java.net.Inet6Address; import java.net.Inet6Address;
import java.net.InetAddress; import java.net.InetAddress;
@ -102,6 +104,14 @@ public enum InformationUtils {
envInfo.addProperty("operatingSystemArchitecture", System.getProperty("os.arch")); envInfo.addProperty("operatingSystemArchitecture", System.getProperty("os.arch"));
envInfo.addProperty("javaVersion", System.getProperty("java.version")); envInfo.addProperty("javaVersion", System.getProperty("java.version"));
envInfo.addProperty("javaVendor", System.getProperty("java.vendor")); envInfo.addProperty("javaVendor", System.getProperty("java.vendor"));
JsonObject listenerInfo = new JsonObject();
listenerInfo.addProperty("listenerType", TransportType.bestType().toString());
listenerInfo.addProperty("compression", Natives.compress.getLoadedVariant());
listenerInfo.addProperty("encryption", Natives.cipher.getLoadedVariant());
envInfo.add("listener", listenerInfo);
return envInfo; return envInfo;
} }