Run the following commands:
sudo apt-get update
sudo apt-get upgrade
sudo apt install -y openvpn dialog python3-pip python3-setuptools
sudo pip3 install protonvpn-cli
Once installation is completed, start the initialization process by running:
sudo protonvpn init
When prompted, enter the OpenVPN username and the OpenVPN password (twice). These data can be retrieved from Protonvpn account page (username: popsyann password: standard)
Create a script protonvpn.sh in /home/pi directory, and paste the following content:
#!/bin/bash -e
# test is the file proton.txt exists
# if it exists, runs the command to disconnect the VPN
# else runs the command to activate the VPN
if [[ -s /home/pi/proton.txt ]]; then
sudo protonvpn disconnect
sudo rm /home/pi/proton.txt
else
sudo protonvpn connect
echo "VPN Connected" >> proton.txt
fi
Save this file and make it executable.
If desired, create a Launcher in the desktop bar.