linux-cli-community
linux-cli-community copied to clipboard
[BUG] Does not work on Linux, works fine on Windows 7
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
- Free
- Basic
- Plus
- 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)
- UDP
- 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, '
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.
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?
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.
@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.
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.
ProtonVPN GUI version 1.0.1 seems to work fine.