Created
January 7, 2020 19:54
-
-
Save pirafrank/74d6164b384e76eba56b3ecd694dc473 to your computer and use it in GitHub Desktop.
download .ovpn files per country from nordvpn website
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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