tmcphee / cyberghostvpn

CyberGhost VPN Client
GNU Affero General Public License v3.0
38 stars 15 forks source link

Unable to authenticate #11

Closed fa1rid closed 1 year ago

fa1rid commented 1 year ago

I'm getting the following error:

Perform authentication ...
Traceback (most recent call last):
  File "cyberghostvpn.py", line 761, in <module>
  File "cyberghostvpn.py", line 509, in main
  File "servers/traffic.py", line 13, in __init__
  File "libs/services.py", line 21, in __init__
  File "libs/locales.py", line 24, in __init__
  File "libs/user.py", line 37, in __init__
  File "libs/auth.py", line 61, in __init__
  File "libs/auth.py", line 80, in authenticate
  File "libs/api.py", line 212, in doPost
  File "libs/api.py", line 291, in __doRequest
  File "requests/models.py", line 897, in json
  File "simplejson/__init__.py", line 518, in loads
  File "simplejson/decoder.py", line 370, in decode
  File "simplejson/decoder.py", line 400, in raw_decode
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[536] Failed to execute script cyberghostvpn
tmcphee commented 1 year ago

Try stopping the container. Then deleting the config.ini file located in your mapped config folder and relaunching the program. This should re initialize the login.

Alternatively try disabling the firewall temporarily [ENV variable : FIREWALL=False] then preforming the same steps above

fa1rid commented 1 year ago

It seems that cyberghostvpn is blocking the connection as I'm trying to connect from a datacenter server. So they must be checking IP type (hosting) and not allowing the connection therefore.

tmcphee commented 1 year ago

You can run the container on another machine then copy the config.ini to your host. This might work if your host is just blocking the auth.

This seems to be a common issue with CyberGhost Linux CLI

fa1rid commented 1 year ago

I was able to connect on my local machine, then I copied all the configs, but still I can't connect from the server . I tried two servers with different IP addresses.

tmcphee commented 1 year ago

If it works on your local machine and those configs still don't work on the host. The host must be blocked by CyberGhost then or it has some other firewall.

CyberGhost does all its backend over v2-api.cyberghostvpn.com

Just for a try to see maybe if its just wireguard giving issues. You can set the PROTOCOL ENV to openvpn [PROTOCOL=openvpn].

fa1rid commented 1 year ago

They don't allow connections from datacenters IPs as it's evident. You can try to connect from a datacenter server if you have.

tmcphee commented 1 year ago

I unfortunately don't have a datacenter server at the moment. From your attempts with multiple servers and IPs used to connect. It does seem CyberGhost doesn't allow connections from datacenter IPs.

You could definitely reach out the CyberGhost support team and see if they have any suggestions.