From af67c1b48c6f3e3d5ff8e6fc59dace0f5e025967 Mon Sep 17 00:00:00 2001 From: fucksophie Date: Sun, 8 Feb 2026 12:24:41 +0200 Subject: [PATCH] add info about .jar files --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ src/autoreconnect.rs | 1 - 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..69a31fb --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +Shipped .jar files are created by me. + +You can recreate them like this: + +## .viaproxy/plugins/ViaProxyOpenAuthMod.jar +This is completely unchanged `https://github.com/ViaVersionAddons/ViaProxyOpenAuthMod/releases/download/v1.0.2/ViaProxyOpenAuthMod-1.0.2.jar`. +Check for yourself: + +``` +sha256sum .viaproxy/plugins/ViaProxyOpenAuthMod.jar +# 95085aac381ae92fc45d476732958b826254be4fbe2876f2d8b619b2373898fe .viaproxy/plugins/ViaProxyOpenAuthMod.jar +curl -L https://github.com/ViaVersionAddons/ViaProxyOpenAuthMod/releases/download/v1.0.2/ViaProxyOpenAuthMod-1.0.2.jar | sha256sum +# 95085aac381ae92fc45d476732958b826254be4fbe2876f2d8b619b2373898fe - +``` + +## .viaproxy/ViaProxy.jar +1. go into viaproxy +2. `src/main/java/net/raphimc/viaproxy/proxy/util/ExceptionUtil.java` +3. modify `ExceptionUtil.handleNettyException` +4. ```java + public static void handleNettyException(ChannelHandlerContext ctx, Throwable cause, ProxyConnection proxyConnection, boolean client2Proxy) { + if (!ctx.channel().isOpen()) return; + if (cause instanceof ClosedChannelException) return; + if (cause instanceof CloseAndReturn) { + ctx.channel().close(); + return; + } + if (!client2Proxy || !ViaProxy.getConfig().shouldSuppressClientProtocolErrors()) { + Logger.LOGGER.error("Caught unhandled netty exception", cause); + // @SOPHER CHANGE START + //try { + // if (proxyConnection != null) { + // proxyConnection.kickClient("§cAn unhandled error occurred in your connection and it has been closed.\n§aError details for report:§f" + ExceptionUtil.prettyPrint(cause)); + // } + //} catch (Throwable ignored) { + //} + } + // literally never close + //ctx.channel().close(); + // @SOPHER CHANGE END + } +``` diff --git a/src/autoreconnect.rs b/src/autoreconnect.rs index e95b501..a1a4c5d 100644 --- a/src/autoreconnect.rs +++ b/src/autoreconnect.rs @@ -7,7 +7,6 @@ use azalea::{ disconnect::DisconnectEvent, ecs::prelude::*, join::{ConnectOpts, ConnectionFailedEvent, StartJoinServerEvent}, - packet::login::ReceiveHelloEvent, prelude::*, };