Skip to content

Instantly share code, notes, and snippets.

@pirafrank
Created January 7, 2020 19:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pirafrank/74d6164b384e76eba56b3ecd694dc473 to your computer and use it in GitHub Desktop.
Save pirafrank/74d6164b384e76eba56b3ecd694dc473 to your computer and use it in GitHub Desktop.
download .ovpn files per country from nordvpn website
#!/bin/bash
country="$1"
# e.g. fr, it, de, etc.
mkdir -p "$country/UDP"
cd $country/UDP
curl -sSL https://nordvpn.com/ovpn | grep -E "\/$country[0-9]*.nordvpn.com" | grep 'UDP' | cut -d'"' -f2 | xargs wget
cd ..
mkdir TCP
cd TCP
curl -sSL https://nordvpn.com/ovpn | grep -E "\/$country[0-9]*.nordvpn.com" | grep 'TCP' | cut -d'"' -f2 | xargs wget
cd ../..
tar -czf "nordvpn_ovpn_$country.tar.gz" $country
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment