Archive incari-client (client, 26.3, clean)
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Sat, 26 Sep 2026 11:07:57 -0400
|
||||
Subject: [PATCH] net: Route remote connections through the platform's
|
||||
transport
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/EventLoopGroupHolder.java b/src/main/java/net/minecraft/server/network/EventLoopGroupHolder.java
|
||||
index ca53989da80a7552bfbe22f05f5ceaa147334b81..c468af4312eb7a62b7be5d0173b79c71c143c0fb 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/EventLoopGroupHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/EventLoopGroupHolder.java
|
||||
@@ -56,2 +56,7 @@
|
||||
public static EventLoopGroupHolder remote(final boolean allowNativeTransport) {
|
||||
+ // Incari start: connections go through the platform's transport
|
||||
+ if (incari.client.net.PlatformEventLoopGroupHolder.routesRemoteConnections()) {
|
||||
+ return incari.client.net.PlatformEventLoopGroupHolder.INSTANCE;
|
||||
+ }
|
||||
+ // Incari end
|
||||
if (allowNativeTransport) {
|
||||
@@ -73,3 +78,5 @@
|
||||
|
||||
- private EventLoopGroupHolder(final String type, final Class<? extends Channel> channelCls, final Class<? extends ServerChannel> serverChannelCls) {
|
||||
+ // Incari start: subclassed by incari.client.net.PlatformEventLoopGroupHolder
|
||||
+ protected EventLoopGroupHolder(final String type, final Class<? extends Channel> channelCls, final Class<? extends ServerChannel> serverChannelCls) {
|
||||
+ // Incari end
|
||||
this.type = type;
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Sun, 27 Sep 2026 17:03:44 -0400
|
||||
Subject: [PATCH] net: Resolve WebSocket addresses without DNS or SRV lookups
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/client/multiplayer/resolver/ServerNameResolver.java b/src/main/java/net/minecraft/client/multiplayer/resolver/ServerNameResolver.java
|
||||
index e02f8e45a9b5e9c4a995cef0b24a3e0267b55bc9..70f15022312422c2e14931ac1d38bd3bc4687d72 100644
|
||||
--- a/src/main/java/net/minecraft/client/multiplayer/resolver/ServerNameResolver.java
|
||||
+++ b/src/main/java/net/minecraft/client/multiplayer/resolver/ServerNameResolver.java
|
||||
@@ -21,2 +21,7 @@
|
||||
public Optional<ResolvedServerAddress> resolveAddress(final ServerAddress address) {
|
||||
+ // Incari start: a WebSocket address needs no DNS or SRV lookup
|
||||
+ if (incari.client.net.WebSocketConnections.isWebSocket(address)) {
|
||||
+ return incari.client.net.WebSocketConnections.resolve(address, this.addressCheck);
|
||||
+ }
|
||||
+ // Incari end
|
||||
Optional<ResolvedServerAddress> resolvedAddress = this.resolver.resolve(address);
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Sun, 27 Sep 2026 17:03:51 -0400
|
||||
Subject: [PATCH] net: Build remote connections with Incari's pipeline
|
||||
(WebSocket, Eagler, Via)
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index 6c13bfd7dd9aa133a3ab992055f8df553dfc8cf8..8022d63a8589af65e5d030c7c442a13666dea5b6 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -426,2 +426,7 @@
|
||||
public static ChannelFuture connect(final InetSocketAddress address, final EventLoopGroupHolder eventLoopGroupHolder, final Connection connection) {
|
||||
+ // Incari start: WebSocket (Eagler) servers and servers of other versions (Via) get Incari's pipeline
|
||||
+ if (incari.client.net.ServerConnections.accepts(address)) {
|
||||
+ return incari.client.net.ServerConnections.connect(address, eventLoopGroupHolder, connection, connection.bandwidthDebugMonitor);
|
||||
+ }
|
||||
+ // Incari end
|
||||
return new Bootstrap().group(eventLoopGroupHolder.eventLoopGroup()).handler(new ChannelInitializer<Channel>() {
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Tue, 29 Sep 2026 07:59:41 -0400
|
||||
Subject: [PATCH] net: Plan each join for the server's version and handshake
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/client/gui/screens/ConnectScreen.java b/src/main/java/net/minecraft/client/gui/screens/ConnectScreen.java
|
||||
index ee1325f73462eab62d4f8619b689d226dd624dc1..4626640c9473381233d6108bda1347490cf0d640 100644
|
||||
--- a/src/main/java/net/minecraft/client/gui/screens/ConnectScreen.java
|
||||
+++ b/src/main/java/net/minecraft/client/gui/screens/ConnectScreen.java
|
||||
@@ -118,2 +118,5 @@
|
||||
address = resolvedAddress.get();
|
||||
+ // Incari start: work out the server's version (Via) and its handshake (Eagler)
|
||||
+ incari.client.net.ServerConnections.prepare(server, hostAndPort);
|
||||
+ // Incari end
|
||||
Connection pendingConnection;
|
||||
@@ -0,0 +1,34 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Tue, 29 Sep 2026 07:59:41 -0400
|
||||
Subject: [PATCH] net: Keep each server's version choice with it
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/client/multiplayer/ServerData.java b/src/main/java/net/minecraft/client/multiplayer/ServerData.java
|
||||
index d7c040d9696f2652ac626b6a7dfcfeee9cbcb260..d341e525944cc6a230b66473898a20b870d2835a 100644
|
||||
--- a/src/main/java/net/minecraft/client/multiplayer/ServerData.java
|
||||
+++ b/src/main/java/net/minecraft/client/multiplayer/ServerData.java
|
||||
@@ -35,2 +35,5 @@
|
||||
private ServerData.State state = ServerData.State.INITIAL;
|
||||
+ // Incari start: the version the player chose for this server (Via), saved with it
|
||||
+ public int incariVersion = incari.client.net.ServerVersions.AUTO;
|
||||
+ // Incari end
|
||||
|
||||
@@ -52,2 +55,5 @@
|
||||
|
||||
+ // Incari start: the chosen version
|
||||
+ incari.client.net.ServerVersions.write(this, tag);
|
||||
+ // Incari end
|
||||
return tag;
|
||||
@@ -68,2 +74,5 @@
|
||||
server.acceptedCodeOfConduct = tag.getIntOr("acceptedCodeOfConduct", 0);
|
||||
+ // Incari start: the chosen version
|
||||
+ incari.client.net.ServerVersions.read(server, tag);
|
||||
+ // Incari end
|
||||
return server;
|
||||
@@ -113,2 +122,5 @@
|
||||
this.type = other.type;
|
||||
+ // Incari start: the chosen version
|
||||
+ this.incariVersion = other.incariVersion;
|
||||
+ // Incari end
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Tue, 29 Sep 2026 07:59:55 -0400
|
||||
Subject: [PATCH] net: Ping Eagler servers with their MOTD query
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/client/multiplayer/ServerStatusPinger.java b/src/main/java/net/minecraft/client/multiplayer/ServerStatusPinger.java
|
||||
index 6f87300e2f2796e124638c2929045b8e156ffc9c..c3d005c8ab6f17c5026b8a71216a7162775ce14c 100644
|
||||
--- a/src/main/java/net/minecraft/client/multiplayer/ServerStatusPinger.java
|
||||
+++ b/src/main/java/net/minecraft/client/multiplayer/ServerStatusPinger.java
|
||||
@@ -56,2 +56,7 @@
|
||||
final ServerAddress rawAddress = ServerAddress.parseString(data.ip);
|
||||
+ // Incari start: Eagler (WebSocket) servers answer a MOTD query instead
|
||||
+ if (incari.client.net.EaglerPings.ping(data, rawAddress, onPersistentDataChange, onPongResponse)) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // Incari end
|
||||
Optional<InetSocketAddress> resolvedAddress = ServerNameResolver.DEFAULT.resolveAddress(rawAddress).map(ResolvedServerAddress::asInetSocketAddress);
|
||||
@@ -0,0 +1,17 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Tue, 29 Sep 2026 07:59:55 -0400
|
||||
Subject: [PATCH] net: Count servers Via can reach as compatible
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/client/gui/screens/multiplayer/ServerSelectionList.java b/src/main/java/net/minecraft/client/gui/screens/multiplayer/ServerSelectionList.java
|
||||
index 4857c6eaf7fba61de51aa6ff6096ee75f7b8fffd..1fa99921cddf97590e119bd6ffaca16a16c090f6 100644
|
||||
--- a/src/main/java/net/minecraft/client/gui/screens/multiplayer/ServerSelectionList.java
|
||||
+++ b/src/main/java/net/minecraft/client/gui/screens/multiplayer/ServerSelectionList.java
|
||||
@@ -285,3 +285,5 @@
|
||||
.setState(
|
||||
- this.serverData.protocol == SharedConstants.getCurrentVersion().protocolVersion()
|
||||
+ // Incari start: servers Via can translate for are compatible
|
||||
+ incari.client.net.ServerVersions.isCompatible(this.serverData.protocol)
|
||||
+ // Incari end
|
||||
? ServerData.State.SUCCESSFUL
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Tue, 29 Sep 2026 07:59:55 -0400
|
||||
Subject: [PATCH] net: Choose a server's version on its edit screen
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/client/gui/screens/ManageServerScreen.java b/src/main/java/net/minecraft/client/gui/screens/ManageServerScreen.java
|
||||
index 7591bf0154dba2c637300b10e7d9e64c0c53580e..ba9e0662df110be4959febba256be93d885632ac 100644
|
||||
--- a/src/main/java/net/minecraft/client/gui/screens/ManageServerScreen.java
|
||||
+++ b/src/main/java/net/minecraft/client/gui/screens/ManageServerScreen.java
|
||||
@@ -54,2 +54,5 @@
|
||||
);
|
||||
+ // Incari start: the server's version (Via), under the resource pack button
|
||||
+ this.addRenderableWidget(incari.client.net.ServerVersions.button(this.serverData, this.width / 2 - 100, this.height / 4 + 93));
|
||||
+ // Incari end
|
||||
this.addButton = this.addRenderableWidget(
|
||||
@@ -0,0 +1,26 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Tue, 29 Sep 2026 16:30:12 -0400
|
||||
Subject: [PATCH] net: Keep the version chosen on the edit screen
|
||||
|
||||
The edit callback copied the name, address and resource pack status onto
|
||||
the list entry but not the Via version, so every edit reset it to Auto.
|
||||
|
||||
Signed-off-by: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen.java b/src/main/java/net/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen.java
|
||||
index 20f35b106b9e06fb030b78ad3321d927c1f26730..37251f6a34d8e8e9df484c26c0bc3dab4b193b6d 100644
|
||||
--- a/src/main/java/net/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen.java
|
||||
+++ b/src/main/java/net/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen.java
|
||||
@@ -194,2 +194,5 @@
|
||||
current.setResourcePackStatus(this.editingServer.getResourcePackStatus());
|
||||
+ // Incari start: keep the version chosen on the edit screen
|
||||
+ current.incariVersion = this.editingServer.incariVersion;
|
||||
+ // Incari end
|
||||
this.servers.save();
|
||||
@@ -206,2 +209,5 @@
|
||||
serverData.copyNameIconFrom(this.editingServer);
|
||||
+ // Incari start: a hidden entry that is added again takes the version chosen for it
|
||||
+ serverData.incariVersion = this.editingServer.incariVersion;
|
||||
+ // Incari end
|
||||
this.servers.save();
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Tue, 29 Sep 2026 17:53:23 -0400
|
||||
Subject: [PATCH] net: Join again with the version a server's refusal names
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/client/gui/screens/DisconnectedScreen.java b/src/main/java/net/minecraft/client/gui/screens/DisconnectedScreen.java
|
||||
index 3eadecbf7e8e8e2c40731ccb2779656774c32d24..ed78adea68fdc5111e43d12f1acd60eb9f92d484 100644
|
||||
--- a/src/main/java/net/minecraft/client/gui/screens/DisconnectedScreen.java
|
||||
+++ b/src/main/java/net/minecraft/client/gui/screens/DisconnectedScreen.java
|
||||
@@ -43,2 +43,5 @@
|
||||
protected void init() {
|
||||
+ // Incari start: a join Incari can recover (a version refusal, a password, a redirect) goes on
|
||||
+ if (incari.client.net.JoinFailures.handle(this.minecraft, this.parent, this.details.reason())) return;
|
||||
+ // Incari end
|
||||
this.layout.defaultCellSetting().alignHorizontallyCenter().padding(10);
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Tue, 6 Oct 2026 22:30:42 -0400
|
||||
Subject: [PATCH] net: Open to LAN fails as a port that won't open where
|
||||
nothing can listen
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
index 830424a4313c82f4c63bba829081e6a27acfcbad..80afc45e0504b8bc3857e892c16953106fdab61f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
@@ -58,2 +58,5 @@
|
||||
public void startTcpServerListener(final @Nullable InetAddress address, final int port) throws IOException {
|
||||
+ // Incari start: a page can't listen for connections; fail as a port that won't open does
|
||||
+ incari.client.net.LanHosting.checkCanListen();
|
||||
+ // Incari end
|
||||
synchronized (this.channels) {
|
||||
Reference in New Issue
Block a user