ProtonVPN / linux-cli

Official ProtonVPN Linux app (CLI)
https://protonvpn.com/download-linux
GNU General Public License v3.0
332 stars 42 forks source link

Warning about 'root' user and possible broken permissions #93

Closed AngryPhantom closed 1 year ago

AngryPhantom commented 1 year ago

We are happy to answer your questions about the code or discuss technical ideas.

Please complete the following checklist (by adding [x]):


Hello,

First, I'd really like to thank you for this awesome VPN. It helps a lot reaching some banned websites from other countries (for political reasons etc). But I have a question. When I install it or upgrade the CLI application afterwards with sudo I get a warning like this:

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behavior with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

As far as I understand it should a system app that creates a connection and stuff and I need sudo. Right? Or do I really have to create this virtual environment instead in order to avoid possible broken permissions in my system? Anyone with such experience here? And how to create it properly? (I'm sorry, if it's a newbie thing)

Thank you in advance!

calexandru2018 commented 1 year ago

Hey @AngryPhantom

Could you paste here the command that you use to launch the CLI please ?

AngryPhantom commented 1 year ago

@calexandru2018

I launch it with: sudo protonvpn connect or sudo protonvpn c -f

But I got this output in the beginning when I installed proton with: sudo pip install protonvpn-cli

And later when I check for upgrades with: sudo pip install protonvpn-cli --upgrade

Distro: Arch Linux and Void Linux.

AngryPhantom commented 1 year ago

P.S. It works but I'm worried with this warning and permissions, etc.

calexandru2018 commented 1 year ago

So you're running the legacy version of CLI (previous community project) from Pip, which is this one: https://github.com/Rafficer/linux-cli-community. We do not support the use of this package, so if you do, you should do it at your own risk.

Our official package is based on NetworkManager and thus does not require root permissions. You can find the official meta-package here: https://aur.archlinux.org/packages/protonvpn

AngryPhantom commented 1 year ago

@calexandru2018 So you don't have a plain python package/script anymore? The thing is that I don't use NetworkManager, I prefer cli tools or connman as a last resort.

AngryPhantom commented 1 year ago

Figured it out. You have also .ovpn configs. That's what I need. Thanks! Cheers.