42 lines
1.8 KiB
Markdown
42 lines
1.8 KiB
Markdown
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
|
|
}
|
|
```
|