jotyGill / openpyn-nordvpn

Easily connect to and switch between, OpenVPN servers hosted by NordVPN on Linux (+patch leakes)
GNU General Public License v3.0
628 stars 114 forks source link

hiya :), this is what I am currently using to select servers in countries, without downloading the whole API #300

Open christopherreay opened 1 year ago

christopherreay commented 1 year ago

get recommended server for country name

countryName=$1

if [ -z $countryName ]
then
  countryName="Germany"
  countryID=81
else
  countryID=`curl --silent "https://api.nordvpn.com/v1/servers/countries" | jq --raw-output 'map(del(.cities)) | .[] | select(.name == '\"$countryName\"') | .id'`
fi
echo "{ \"countryName\": \"$countryName\", \"countryID\": $countryID }"  >&2

curl --silent https://nordvpn.com/wp-admin/admin-ajax.php -G -d "action=servers_recommendations&filters={%22country_id%22:$countryID}" | jq .[0].hostname -r | sed 's/\.nordvpn\.com$//' | cut -d'.' -f1

do you want me to code something like this up for openpyn?

ickam commented 1 year ago

Seems like @jotyGill is MIA, so if you'd fork this project, and resolve #297 you'd be doing a lot of people a massive favour @christopherreay I know I would love it.

christopherreay commented 1 year ago

Yes, ok :)

Which one of us is holding the fishing pole. lol.

OK, Ill sort that out. Gimme until next week to squish it into my schedule, and we'll write up something for the community. Can you give me a hand with the community stuff?

Thanks Marek.

ickam commented 1 year ago

What kind of help would you like? I am a somewhat passive user of github, as my understanding of code is extremely limited. Having said that, if I can help, I most definitely shall. :)

ickam commented 9 months ago

@christopherreay any progress on this?