Add Unix domain socket support (#5611)

Tested-by: Mariell Hoversholm <proximyst@proximyst.com>
Reviewed-by: Mariell Hoversholm <proximyst@proximyst.com>
This commit is contained in:
Andrew Steinborn
2021-05-23 07:18:50 -04:00
parent 7127d40dae
commit 7a227d7d3b
3 changed files with 151 additions and 4 deletions

View File

@@ -268,7 +268,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return;
+ }
+
+ this.networkManager.socketAddress = new java.net.InetSocketAddress(com.destroystokyo.paper.proxy.VelocityProxy.readAddress(buf), ((java.net.InetSocketAddress) this.networkManager.getSocketAddress()).getPort());
+ java.net.SocketAddress listening = this.networkManager.getSocketAddress();
+ int port = 0;
+ if (listening instanceof java.net.InetSocketAddress) {
+ port = ((java.net.InetSocketAddress) listening).getPort();
+ }
+ this.networkManager.socketAddress = new java.net.InetSocketAddress(com.destroystokyo.paper.proxy.VelocityProxy.readAddress(buf), port);
+
+ this.setGameProfile(com.destroystokyo.paper.proxy.VelocityProxy.createProfile(buf));
+