From 574113bf28f4e40e0be3870274c7a5e2ae2a88e1 Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 26 Oct 2023 15:29:32 +0100 Subject: [PATCH] Update exec mullvad connect w/ location set --- includes/provider.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/includes/provider.php b/includes/provider.php index 42e5a403..b117e693 100755 --- a/includes/provider.php +++ b/includes/provider.php @@ -112,14 +112,12 @@ function saveProviderConfig($status, $binPath, $country, $id = null) { $status->addMessage(sprintf(_('Attempting to connect to %s'),$country), 'info'); $cmd = getCliOverride($id, 'cmd_overrides', 'connect'); - if ($id == 2) { // mullvad requires location set - exec("sudo $binPath set location $country", $return); - sleep(1); - exec("sudo $binPath $cmd $country", $return); - sleep(3); // required for connect delay + // mullvad requires relay set location before connect + if ($id == 2) { + exec("sudo $binPath relay set location $country", $return); + exec("sudo $binPath $cmd", $return); } else { exec("sudo $binPath $cmd $country", $return); - sleep(3); } $return = stripArtifacts($return); foreach ($return as $line) {