19 May 2023 | Linux Guide, Privacy
It is widely known that the Proton team does not focus on Linux users as much as they focus on Windows and macOS users. The official Proton VPN Linux client lacks a lot of features, like changing the connection protocol, quickly connecting to the fastest server of a specific country, enabling their VPN Accelerator etc.
However, we can achieve a lot using their official CLI client. And yes, that is what we are going to use. No third-party applications.
Get the Proton VPN repository setup DEB package:
wget https://repo.protonvpn.com/debian/dists/stable/main/binary-all/protonvpn-stable-release_1.0.3_all.deb
Install the Proton VPN repository:
sudo apt-get install ./protonvpn-stable-release_1.0.3_all.deb
Update the apt-get package list:
sudo apt-get update
Install the Proton VPN Linux CLI:
sudo apt-get install protonvpn-cli
Get the Proton VPN repository setup RPM package:
wget https://protonvpn.com/download/protonvpn-stable-release-1.0.1-1.noarch.rpm
Install the Proton VPN repository:
sudo dnf install ./protonvpn-stable-release-1.0.1-1.noarch.rpm
Update the dnf package list:
sudo dnf update
Install the Proton VPN Linux CLI:
sudo dnf install protonvpn-cli
Install required dependencies for the alternative routing feature:
sudo dnf install python3-pip
pip3 install --user 'dnspython>=1.16.0
Update your local repository:
pamac update --force-refresh
Verify that Proton VPN is now in your local repository:
pamac search --aur protonvpn-cli
Build and install Proton VPN:
pamac build protonvpn-cli
Note - Visit the Proton VPN’s official documentation page if you get any errors or need detailed instructions.
To log in, use this command and follow the on-screen instructions:
protonvpn-cli login
Turn on VPN Accelerator:
protonvpn-cli config --vpn-accelerator enable
Turn on NetShield to block ads and malware:
protonvpn-cli ns --ads-malware
Change default connection protocol to TCP:
protonvpn-cli config -p tcp
Change DNS configuration:
protonvpn-cli config --dns custom --ip 9.9.9.9
You can add upto 3 IPs, or leave it at automatic by using this command:
protonvpn-cli config --dns automatic
Turn on alternative routing to circumvent censorship:
protonvpn-cli config --alt-routing enable
Turn on the Kill Switch:
protonvpn-cli ks --on
or
protonvpn-cli ks --permanent
For more configuration options, use:
protonvpn-cli --help
and
protonvpn-cli config --help
To manually select the country and the server to connect to, use the following command and follow the on-screen instructions:
protonvpn-cli c
To connect to the fastest Proton VPN server for your location, for example, enter:
protonvpn-cli c -f
To connect to the fastest Tor server, enter:
protonvpn-cli c --tor
To connect to the fastest server in a specific country, a country code can be used. For example, the following command connects to the fastest server in Germany using TCP:
protonvpn-cli c --cc DE -p TCP
The following method is tested on Debian 11 with Xfce, Fedora 38 Workstation with Gnome and Manjaro 22.1.1 with KDE.
Go to the autostart folder in your home directory which contains all your application shortcuts that start immediately after login:
cd ~/.config/autostart
Create a new file:
nano pvpn.desktop
Paste the following:
[Desktop Entry]
Exec=protonvpn-cli c -f
Name=ProtonVPN Autoconnect
Comment=Autoconnect to the fastest server
Type=Application
Icon=protonvpn-logo
Change the “Exec” value according to your needs. For example, use
protonvpn-cli c --cc DE -p TCP
to connect to the fastest server in Germany using the TCP protocol. Save the file by hitting Ctrl + X, then Y, and then Enter.
Test this by logging out and then logging back in. Or just restart the whole system. If everything went perfectly, you should be automatically connected to the VPN when you log in.
If due to some reason you are not automatically connected, change the “Exec” value to:
Exec=bash -c "sleep 10 && protonvpn-cli c -f"
This will delay the command execution by ten seconds.
There are other options:
Music – Other Projects – – Privacy Policy – About
Comments