runelite / runelite

Open source Old School RuneScape client
https://runelite.net
BSD 2-Clause "Simplified" License
4.76k stars 5.21k forks source link

VPN Exception Prevents Connecting to Bootstrap #16507

Open Mik615 opened 1 year ago

Mik615 commented 1 year ago

Type

Crash or hang

Operating System

Windows

OS Version

Windows 10

Bug description

When I add an app exception in my VPN to Runelite, it does not launch. I currently use MozillaVPN. I thought it might be a java issue, but I added exceptions to Java too without avail, and other java apps seem to work perfectly. The main reason for excluding runelite from the VPN is because I find enabling the VPN causes it to lag quite a bit. A fresh install of either Runelite or MozillaVPN does not solve the problem.

The app works when I turn the VPN off AND also when the VPN on the app is not added as an exception. Also I made sure that the issue is not firewall based. I contacted Mozilla support and they said that _"excluding apps from VPN protection using the “App Exclusions” feature should not interfere in any way with the excluded app itself.", So it seems like a Runelite issue.

Here is the error code:

ERROR net.runelite.launcher.Launcher - error fetching bootstrap java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machine

I also attached the launcher log below.

I don't seem to be the only person having this issue. Surfshark seems to have a similar problem, along with possibly more VPNs: https://www.reddit.com/r/2007scape/comments/r3ysiv/help_with_runelite_and_vpn/

I wouldn't be surprised if Runelite can't connect to the bootstrap because it tries using IPV6 instead of IPV4 or something like that, but I'm not an expert.

I will be willing to provide more info if needed. Thank you

Screenshots or videos

RuneliteVPNError

RuneLite version

RuneLite version: 1.9.15.2 launcher version: 2.2.0 / 2.6.3

Logs

launcher.log

Nightfirecat commented 1 year ago

Does setting -Djava.net.preferIPv4Stack=true affect this at all?

Martsssss commented 1 year ago

I'm also getting this issue with Mullvad VPN. I used to be able to launch Runelite directly whilst using VPN no problem at all and now it doesn't work whatsoever when the VPN is active whether I've added it to the split tunnelling list or not.

The above doesn't work, provided the way of doing it is making a shortcut and adding it in the target box.

Ammako commented 1 year ago

I'd be interested in seeing what dns requests are being made (to which dns servers, and by which applications.) Wireshark would help here.

You could also check if another VPN behaves the same, to rule out Mozilla being the problem. Proton has a free tier if you need another VPN for testing.

It would also be useful to know if other apps also have issues through split tunneling or if it's just Runelite, though. I'd imagine you already tried other apps, but it's not mentioned, so I need to make sure.

@Martsssss I'd just disable ipv6 in mullvad.

Martsssss commented 1 year ago

@Ammako unfortunately disabling ipv6 doesn't do anything, I still get the same errors.

BramButterham commented 1 year ago

@Mik615 I ran into the same problem after upgrading to a Jagex account. I added the Jagex Launcher to a split tunnel. I have not found a true solution, but what works for me is launching Runelite through the Jagex Launcher first, log in, and then activate the VPN. I have not tried world hopping yet, but after 6 hours I'm gonna close all applications except Runelite, turn off VPN, world hop, turn VPN back on.

Martsssss commented 1 year ago

@Mik615 I ran into the same problem after upgrading to a Jagex account. I added the Jagex Launcher to a split tunnel. I have not found a true solution, but what works for me is launching Runelite through the Jagex Launcher first, log in, and then activate the VPN. I have not tried world hopping yet, but after 6 hours I'm gonna close all applications except Runelite, turn off VPN, world hop, turn VPN back on.

Interestingly this doesn't work for me at all, Jagex Launcher is excluded already, I log in via runelite then the second I click connect to VPN it logs me out with an error, and I can't log back in again.

Ammako commented 1 year ago

If you're able to exclude addresses or hostnames, I'd try excluding *.jagex.com and *.runescape.com instead

notonetospeak commented 11 months ago

So I am having the same problem as you all. On my main computer, as soon as I start up my RuneLite I get "ConnectException". "Message: connect: Address is invalid on local machine, or port is not valid on remote machine"

I tried starting up Runelite with NordVPN on some random fresh virtual machine and Runelite worked just fine without any issues.

Is it possible that some settings somewhere changed that runelite is using LAN IP address instead of picking the VPN IP address on my main computer since the VM environment worked fine.

Alexsuperfly commented 11 months ago

this looks like a duplicate of #15098 try doing https://github.com/runelite/runelite/issues/15098#issuecomment-1728693834