From 131d675d5df1ed09618ad3946c50c99d70aa5729 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 14 Mar 2024 12:09:45 -0400 Subject: [PATCH] add message about split tunneling for WSAEADDRNOTAVAIL --- .../net/runelite/launcher/FatalErrorDialog.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/runelite/launcher/FatalErrorDialog.java b/src/main/java/net/runelite/launcher/FatalErrorDialog.java index f890bead..76e80326 100644 --- a/src/main/java/net/runelite/launcher/FatalErrorDialog.java +++ b/src/main/java/net/runelite/launcher/FatalErrorDialog.java @@ -216,8 +216,20 @@ public static void showNetErrorWindow(String action, Throwable err) if (err instanceof SocketException) // includes ConnectException { - new FatalErrorDialog(formatExceptionMessage("RuneLite is unable to connect to a required server while " + action + ". " + - "Please check your internet connection.", err)) + String message = "RuneLite is unable to connect to a required server while " + action + "."; + + // hardcoded error message from PlainSocketImpl.c for WSAEADDRNOTAVAIL + if (err.getMessage().equals("connect: Address is invalid on local machine, or port is not valid on remote machine")) + { + message += " Cannot assign requested address. This error is most commonly caused by \"split tunneling\" support in VPN software." + + " If you are using a VPN, try turning \"split tunneling\" off."; + } + else + { + message += " Please check your internet connection."; + } + + new FatalErrorDialog(formatExceptionMessage(message, err)) .open(); return; }