Skip to content

Instantly share code, notes, and snippets.

@jjmartres
Forked from Betree/AllCyberghostConfigUrls.md
Last active April 8, 2023 02:29
Show Gist options
  • Save jjmartres/193d1964d5f472b15aea0c0dcd32f1ac to your computer and use it in GitHub Desktop.
Save jjmartres/193d1964d5f472b15aea0c0dcd32f1ac to your computer and use it in GitHub Desktop.
Cyberghost linux VPN configs urls for all countries

Cyberghost linux VPN configs urls for all countries

Download all the available linux configurations for your cyberghost account using the following links. These links are good for a premium account using openvpn UDP. If you want to use a different protocol, are not premium or if you want an up-to-date list, please follow the guide in the "Method" section.

You must be logged in to download these links !

Method

  1. Connect to your account at https://account.cyberghostvpn.com/

  2. Go to https://account.cyberghostvpn.com/en_us/proxy/servers/groupedbycountry?protocol=openvpn

    You can set protocol to the following :

    • OpenVPN UDP : openvpn
    • OpenVPN TCP : openvpn_tcp
    • IPSEC / L2TP : l2tp
    • PPTP : pptp
  3. Get the content and save it as 'cyberghost.json'

  4. Open a python console and paste the following code :

# coding: utf-8
import json

with open('cyberghost.json') as f:
    countries = json.load(f)['countries']

def best_server(servers):
    premium = next((s for s in servers if s['name'] == 'Premium Servers'), None)
    return premium or servers[0]

servers = [{'country': country['countrycode'], 'url': best_server(country['servers'])['url']} for country in countries]
api_urls = ['https://api2.cyberghostvpn.com/cg/serverconfigurations/download/4?country={}&os=linux&url={}'.format(server['country'], server['url']) for server in servers]

with open('cyberghost_urls.txt', 'w') as f:
    f.write('\n'.join(api_urls))


@jojo2massol
Copy link

The link doesn't seem to work anymore. Even connected to my account. Where did you get this link?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment