Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated autoconnect setup for encrypted home dir #192

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ For more detailed information on installing, updating and uninstalling, please v

For the following Linux distribution(s), install the official `protonvpn-cli` package:

#### Guix

```sh
guix install protonvpn-cli
```

#### Fedora

```sh
Expand Down Expand Up @@ -68,6 +74,7 @@ Depending on your distribution, run the appropriate following command to install
|Ubuntu/Linux Mint/Debian and derivatives | `sudo apt install -y openvpn dialog python3-pip python3-setuptools`|
|OpenSUSE/SLES | `sudo zypper in -y openvpn dialog python3-pip python3-setuptools` |
|Arch Linux/Manjaro | `sudo pacman -S openvpn dialog python-pip python-setuptools` |
|Guix | `guix environment protonvpn-cli` |

#### Installing ProtonVPN-CLI

Expand Down
23 changes: 23 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This document provides an extensive guide on how to install and use ProtonVPN-CL
- [Table of Contents](#table-of-contents)
- [Installation & Updating](#installation--updating)
- [Installing from distribution repositories](#installing-from-distribution-repositories)
- [Guix](#guix)
- [Fedora](#fedora)
- [CentOS & RHEL](#centos--rhel)
- [Installing from PyPI](#installing-from-pypi)
Expand Down Expand Up @@ -43,6 +44,12 @@ This document provides an extensive guide on how to install and use ProtonVPN-CL

For the following Linux distribution(s), install the official `protonvpn-cli` package:

#### Guix

```sh
guix install protonvpn-cli
```

#### Fedora

```sh
Expand Down Expand Up @@ -85,6 +92,7 @@ Depending on your distribution, run the appropriate following command to install
|Ubuntu/Linux Mint/Debian and derivatives | `sudo apt install -y openvpn dialog python3-pip python3-setuptools`|
|OpenSUSE/SLES | `sudo zypper in -y openvpn dialog python3-pip python3-setuptools` |
|Arch Linux/Manjaro | `sudo pacman -S openvpn dialog python-pip python-setuptools` |
|Guix | `guix environment protonvpn-cli` |

#### Installing ProtonVPN-CLI

Expand Down Expand Up @@ -494,3 +502,18 @@ Systemd is the current init system of most major Linux distributions. This guide
`sudo systemctl enable protonvpn-autoconnect`

Now ProtonVPN-CLI should connect automatically when you boot up your system.

#### Additional steps for systems with encrypted home directory

Because ProtonVPN-CLI can not access encrypted home directories before the user is logged in, setting up auto-connect on systems with encrypted home directories requires a few more steps.

6. Initialize your ProtonVPN profile as root by running:
```sh
su
protonvpn init
```
If you have not set a root password (it is not set by default on most Ubuntu-based distributions) you may run `sudo passwd root` and set the password before running `su`.

7. Open the `/etc/systemd/system/protonvpn-autoconnect.service` file created above and remove the `Environment=SUDO_USER=user` line.

*Note: if the VPN connection drops, you will need to run `su` then `protonvpn r` to reconnect as just `sudo protonvpn r` will not take into account the connection started by root which will cause the reconnection to fail.*