proton-vpn-cli

Proton VPN CLI from the official Proton VPN repositories, without the GUI.

See: https://protonvpn.com/support/official-linux-vpn-fedora

How to use

  • Install either this sysext or proton-vpn, not both: the GUI sysext already includes the CLI.
  • NetworkManager’s OpenVPN plugin (NetworkManager-openvpn and NetworkManager-openvpn-gnome) and a Secret Service provider (gnome-keyring is the one supported by Proton) are not included and must be part of the image. They are included in Fedora Silverblue.

Split tunneling is not supported

Proton implements split tunneling in proton-vpn-daemon with eBPF programs compiled at runtime by bcc. Shipping it would add the LLVM and Clang libraries (most of the size of the sysext) and a root daemon, and it needs headers for the running kernel and does not work on kernels locked down in confidentiality mode. The daemon and its dependencies are thus removed from this sysext.

Compatibility

This sysext is only built for x86_64.

Versions available

See the proton-vpn-cli versions.

Usage instructions

First time setup

Run those commands if you have not yet installed any sysext on your system:

sudo install -d -m 0755 -o 0 -g 0 "/var/lib/extensions" "/var/lib/extensions.d"
sudo restorecon -RFv "/var/lib/extensions" "/var/lib/extensions.d"
sudo systemctl enable --now systemd-sysext.service
Installation

Define a helper function:

install_sysext() {
  SYSEXT="${1}"
  URL="https://extensions.fcos.fr/community"
  sudo install -d -m 0755 -o 0 -g 0 "/etc/sysupdate.${SYSEXT}.d"
  sudo restorecon -RFv "/etc/sysupdate.${SYSEXT}.d"
  curl --silent --fail --location "${URL}/${SYSEXT}.conf" \
    | sudo tee "/etc/sysupdate.${SYSEXT}.d/${SYSEXT}.conf"
  sudo /usr/lib/systemd/systemd-sysupdate update --component "${SYSEXT}"
}

Install the sysext:

install_sysext proton-vpn-cli

Reboot your system or refresh the merged sysexts:

sudo systemctl restart systemd-sysext.service
systemd-sysext status

Note that this will merge all installed sysexts unconditionally.

Updates

Update this sysext using:

sudo /usr/lib/systemd/systemd-sysupdate update --component proton-vpn-cli

If you want to use the new version immediately, make sure to refresh the merged sysexts:

sudo systemctl restart systemd-sysext.service
systemd-sysext status

To update all sysexts on a system:

for c in $(/usr/lib/systemd/systemd-sysupdate components --json=short | jq --raw-output '.components[]'); do
    sudo /usr/lib/systemd/systemd-sysupdate update --component "${c}"
done
Uninstall

Define a helper function:

uninstall_sysext() {
  SYSEXT="${1}"
  sudo rm -i "/var/lib/extensions/${SYSEXT}.raw"
  sudo rm -i "/var/lib/extensions.d/${SYSEXT}-"*".raw"
  sudo rm -i "/etc/sysupdate.${SYSEXT}.d/${SYSEXT}.conf"
  sudo rmdir "/etc/sysupdate.${SYSEXT}.d/"
}

Uninstall the sysext:

uninstall_sysext proton-vpn-cli

Reboot your system or refresh the merged sysexts:

sudo systemctl restart systemd-sysext.service
systemd-sysext status