mirror of
https://github.com/PaperMC/Velocity.git
synced 2024-11-21 03:11:38 +08:00
Add native info to dump
This commit is contained in:
parent
118c4b451c
commit
4ef9a33f4c
@ -35,7 +35,7 @@ import io.netty.channel.socket.nio.NioSocketChannel;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
enum TransportType {
|
||||
public enum TransportType {
|
||||
NIO("NIO", NioServerSocketChannel::new,
|
||||
NioSocketChannel::new,
|
||||
NioDatagramChannel::new,
|
||||
|
@ -32,6 +32,8 @@ import com.velocitypowered.api.proxy.ProxyServer;
|
||||
import com.velocitypowered.api.proxy.config.ProxyConfig;
|
||||
import com.velocitypowered.api.proxy.server.RegisteredServer;
|
||||
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.Inet6Address;
|
||||
import java.net.InetAddress;
|
||||
@ -102,6 +104,14 @@ public enum InformationUtils {
|
||||
envInfo.addProperty("operatingSystemArchitecture", System.getProperty("os.arch"));
|
||||
envInfo.addProperty("javaVersion", System.getProperty("java.version"));
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user