linux-cli-community icon indicating copy to clipboard operation
linux-cli-community copied to clipboard

[BUG] Does not work on Linux, works fine on Windows 7

Open SCCOBN opened this issue 4 years ago • 5 comments

Describe the bug It used to work fine, until about October 2020, then it stopped working, at that I could connect from Windows 7, thus it is not an issue with internet. Today I decided to figure things out and tried reinit-ing and it couldn't do it, told me [!] There was an error connecting to the ProtonVPN API.

sudo protonvpn init
[ -- PROTONVPN-CLI INIT -- ]

ProtonVPN uses two different sets of credentials, one for the website and official apps where the username is most likely your e-mail, and one for connecting to the VPN servers.

You can find the OpenVPN credentials at https://account.protonvpn.com/account.

--- Please make sure to use the OpenVPN credentials ---

Enter your ProtonVPN OpenVPN username: tyEBoZH92tgbLoTg75pM8QU0 Enter your ProtonVPN OpenVPN password: Confirm your ProtonVPN OpenVPN password:

Please choose your ProtonVPN Plan

  1. Free
  2. Basic
  3. Plus
  4. Visionary

Your plan: 1

Choose the default OpenVPN protocol. OpenVPN can act on two different protocols: UDP and TCP. UDP is preferred for speed but might be blocked in some networks. TCP is not as fast but a lot harder to block. Input your preferred protocol. (Default: UDP)

  1. UDP
  2. TCP

Your choice: 2

You entered the following information: Username: tyEBoZH92tgbLoTg75pM8QU0 Password: ************************ Tier: Free Default protocol: TCP

Is this information correct? [Y/n]: Writing configuration to disk... [!] There was an error connecting to the ProtonVPN API. [!] Please make sure your connection is working properly!

To Reproduce Steps to reproduce the behavior: Just type sudo protonvpn init or if it was initialized already, sudo protonvpn connect It would time out and give you this error.

Error Messages/Program Output/Log Messages (~/.pvpn-cli/pvpn-cli.log) 2021-01-04 08:02:20,259 — protonvpn-cli — DEBUG — change_file_owner:325 — Changed owner of /home/alex/.pvpn-cli/pvpn-cli.log to alex 2021-01-04 08:02:20,259 — protonvpn-cli — DEBUG — cli:84 — ########################### 2021-01-04 08:02:20,259 — protonvpn-cli — DEBUG — cli:85 — ### NEW PROCESS STARTED ### 2021-01-04 08:02:20,260 — protonvpn-cli — DEBUG — cli:86 — ########################### 2021-01-04 08:02:20,260 — protonvpn-cli — DEBUG — cli:87 — ['/usr/bin/protonvpn', 'init'] 2021-01-04 08:02:20,260 — protonvpn-cli — DEBUG — cli:88 — USER: alex 2021-01-04 08:02:20,260 — protonvpn-cli — DEBUG — cli:89 — CONFIG_DIR: /home/alex/.pvpn-cli 2021-01-04 08:02:20,264 — protonvpn-cli — DEBUG — cli:92 — Arguments {'--cc': None, '--fastest': False, '--help': False, '--p2p': False, '--random': False, '--sc': False, '--tor': False, '--version': False, '-p': None, '': None, 'c': False, 'configure': False, 'connect': False, 'd': False, 'disconnect': False, 'examples': False, 'init': True, 'r': False, 'reconnect': False, 'refresh': False, 's': False, 'status': False} 2021-01-04 08:02:20,276 — protonvpn-cli — DEBUG — change_file_owner:325 — Changed owner of /home/alex/.pvpn-cli to alex 2021-01-04 08:03:01,342 — protonvpn-cli — DEBUG — change_file_owner:325 — Changed owner of /home/alex/.pvpn-cli/pvpn-cli.cfg to alex 2021-01-04 08:03:01,343 — protonvpn-cli — DEBUG — init_config_file:175 — pvpn-cli.cfg initialized 2021-01-04 08:03:01,344 — protonvpn-cli — DEBUG — call_api:36 — Initiating API Call: https://api.protonvpn.ch/vpn/logicals 2021-01-04 08:05:12,345 — protonvpn-cli — DEBUG — call_api:51 — Error connecting to ProtonVPN API 2021-01-04 08:08:37,333 — protonvpn-cli — DEBUG — cli:84 — ########################### 2021-01-04 08:08:37,333 — protonvpn-cli — DEBUG — cli:85 — ### NEW PROCESS STARTED ### 2021-01-04 08:08:37,333 — protonvpn-cli — DEBUG — cli:86 — ########################### 2021-01-04 08:08:37,333 — protonvpn-cli — DEBUG — cli:87 — ['/usr/bin/protonvpn'] 2021-01-04 08:08:37,333 — protonvpn-cli — DEBUG — cli:88 — USER: alex 2021-01-04 08:08:37,333 — protonvpn-cli — DEBUG — cli:89 — CONFIG_DIR: /home/alex/.pvpn-cli 2021-01-04 08:08:54,193 — protonvpn-cli — DEBUG — cli:84 — ########################### 2021-01-04 08:08:54,193 — protonvpn-cli — DEBUG — cli:85 — ### NEW PROCESS STARTED ### 2021-01-04 08:08:54,193 — protonvpn-cli — DEBUG — cli:86 — ########################### 2021-01-04 08:08:54,193 — protonvpn-cli — DEBUG — cli:87 — ['/usr/bin/protonvpn', 'configure'] 2021-01-04 08:08:54,193 — protonvpn-cli — DEBUG — cli:88 — USER: alex 2021-01-04 08:08:54,194 — protonvpn-cli — DEBUG — cli:89 — CONFIG_DIR: /home/alex/.pvpn-cli 2021-01-04 08:08:54,198 — protonvpn-cli — DEBUG — cli:92 — Arguments {'--cc': None, '--fastest': False, '--help': False, '--p2p': False, '--random': False, '--sc': False, '--tor': False, '--version': False, '-p': None, '': None, 'c': False, 'configure': True, 'connect': False, 'd': False, 'disconnect': False, 'examples': False, 'init': False, 'r': False, 'reconnect': False, 'refresh': False, 's': False, 'status': False} 2021-01-04 08:08:54,205 — protonvpn-cli — DEBUG — check_init:436 — Initialized Profile not found

Desktop (please complete the following information):

  • OS: Arch Linux x86_64
  • Python Version: Python 3.9.1
  • ProtonVPN-CLI Version: ProtonVPN-CLI v2.2.6

Additional context Mind you, if I reboot and connect in Windows 7, given using different app, it connects and works fine just. Thus, my internet connection is just fine, Putin is not blocking protonvpn.

SCCOBN avatar Jan 04 '21 05:01 SCCOBN

Can add to this: I can initialize and refresh if I already connected to the VPN (through downloading OpenVPN profile from the ProtonVPN site). So it seems that

This is what I get from proton refresh without an existing VPN connection

2021-01-29 15:27:31,019 — protonvpn-cli — DEBUG — call_api:36 — Initiating API Call: https://api.protonvpn.ch/vpn
/logicals
2021-01-29 15:29:39,564 — protonvpn-cli — DEBUG — call_api:51 — Error connecting to ProtonVPN API

This is with:

2021-01-29 15:30:05,841 — protonvpn-cli — DEBUG — call_api:36 — Initiating API Call: https://api.protonvpn.ch/vpn
/logicals
2021-01-29 15:30:06,522 — protonvpn-cli — DEBUG — call_api:65 — Successful json response
2021-01-29 15:30:06,592 — protonvpn-cli — DEBUG — pull_server_data:87 — SERVER_INFO_FILE written
2021-01-29 15:30:06,601 — protonvpn-cli — DEBUG — pull_server_data:94 — last_api_call updated

So it seems that https://api.protonvpn.ch/vpn/logicals may be blocked in Russia. But the real question is why then android and windows apps do work?

dron1885 avatar Jan 29 '21 12:01 dron1885

Hey @dron1885

The reason they work is because they have an implementation called alternative routing, which helps the bypass certain restrictions.

This cli does not support that, but there are plans to add alternative routing to the official CLI.

calexandru2018 avatar Jan 29 '21 12:01 calexandru2018

@dron1885 Is there any other way we can connect in Linux? Perhaps through openvpn? How about if by using direct IP instead of DNS name. Because this seems to be a simple DNS block.

SCCOBN avatar Mar 04 '21 18:03 SCCOBN

I just commented on #https://github.com/ProtonVPN/linux-cli-community/issues/306. Looking at the stack trace posted on that issue, could a similar problem be causing that behavior? Although I would not expect a domain to be outright blocked on my internet connection unless I blocked it.

pluralmonad avatar May 06 '21 00:05 pluralmonad

ProtonVPN GUI version 1.0.1 seems to work fine.

dron1885 avatar Jun 23 '21 09:06 dron1885