NordVPN-switcher
NordVPN-switcher copied to clipboard
Problems with conection
Sometimes Nord gets stuck trying to conect. is there any way add like a timeout function. Like for example after 10 secounds if no conection is made retry to conect to a new server.
Hi Tiago, thanks for using nordvpn-switcher. The thing is, there is a timeout built into the script right now, but for some reason it doesn't seem to work all that well for some people. I'll doublecheck the script and see what I can do!
👍
Hi, I think i found the problem. But don't know how to solve it. Once you get an error while connecting it causes for some strange settings when you check nordvpn status: ~$ nordvpn status Status: Disconnected Current server: se424.nordvpn.com Country: Sweden City: Stockholm Your new IP: 91.132.138.203 Current technology: OpenVPN Current protocol: UDP Uptime: 2 minutes 35 seconds
It shows disconnected but also shows it is connected. When you do this normally it only shows: ~$ nordvpn status Status: Disconnected
I don't find a way to remove it from the nordvpn status. Doing another disconnect does not help.
Hi, I've made a code to manage this issue, @kboghe if you have time you can include it in nordvpn-switcher, the idea is simple, using the timeout command in Linux,
- sorry if the code is not organized, I'm not using github much, you can find attached a screenshot of the code
for _ in range(10):
connect_cmd = "timeout 10s nordvpn connect " + random.choice(countries)
os.system(connect_cmd)
vpnStatusOutput = subprocess.run(['nordvpn', 'status'], stdout=subprocess.PIPE).stdout.decode('utf-8')
if not "Disconnected" in vpnStatusOutput:
break