Skip to content

Commit

Permalink
Merge pull request #1635 from RaspAP/fix/nordvpn-cli
Browse files Browse the repository at this point in the history
Update parsing of NordVPN countries, fixes #1634
  • Loading branch information
billz authored Aug 10, 2024
2 parents 90d63a6 + 484820f commit a5e2d83
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions includes/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function DisplayProviderConfig()
}

/**
* Validates VPN provider settings
* Validates VPN provider settings
*
* @param object $status
* @param string $binPath
Expand Down Expand Up @@ -240,11 +240,9 @@ function getCountries($id, $binPath)
}
break;
case 3: // nordvpn
$output = stripArtifacts($output,'\s');
$arrTmp = explode(",", $output[0]);
$countries = array_combine($arrTmp, $arrTmp);
foreach ($countries as $key => $value) {
$countries[$key] = str_replace("_", " ", $value);
foreach ($output as $key => $value) {
$countries[$value] = str_replace("_", " ", $value);
}
break;
default:
Expand Down

0 comments on commit a5e2d83

Please sign in to comment.