Skip to content

Commit

Permalink
Update cmd_overrides + stripArtifacts regex
Browse files Browse the repository at this point in the history
  • Loading branch information
billz committed Oct 21, 2023
1 parent 1e6d945 commit ee662ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/vpn-providers.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"install_page": "https://www.expressvpn.com/support/vpn-setup/app-for-linux/",
"cmd_overrides": {
"countries": "list all",
"log": "diagnostics"
"log": "diagnostics",
"version": "-v"
},
"regex": {
"status": "\/not connected\/",
Expand Down
2 changes: 1 addition & 1 deletion includes/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function saveProviderConfig($status, $binPath, $country, $id = null)
*/
function stripArtifacts($output, $pattern = null)
{
$result = preg_replace('/[-\/\n\t\\\\'.$pattern.'|]/', '', $output);
$result = preg_replace('/[-\/\n\t\\\\'.$pattern.'|\[0m\[1;33;49m]/', '', $output);
return $result;
}

Expand Down

0 comments on commit ee662ad

Please sign in to comment.