I use Void Linux, and the official Proton GUI and CLI apps rely heavily on systemd and specific Debian/Fedora integration, so they aren't natively supported or available in the standard XBPS repositories. Damn, that sucks. You might be experiencing something similar, too.
But that actually isn't so bad. We can still use ProtonVPN on Void or anything else (even BSD) by
managing it with just WireGuard or OpenVPN. Buuut OpenVPN is
bloated as hell and I much prefer WireGuard. OpenVPN has its uses if you're already running
NetworkManager for your desktop environment or whatever, but I'm not.
So, Get WireGuard
sudo xbps-install -S wireguard-tools
That's the command for Void users, but wireguard-tools should be the same across other
package manager repos as well.
Grab Your Configurations
- Log in to your account on the Proton VPN website.
- Go to Downloads > WireGuard configuration.
"WireGuard Configuration"
- "Give a name to the config to be generated"
Type something simple and short. Mine is going to beproton-nl. - "Select platform"
...Obviously select GNU/Linux, even if you're using BSD. - "Select VPN options"
Keep VPN Accelerator enabled. It's Proton's multi-core processing to speed up your connection.I'm gonna keep NAT-PMP (Port Forwarding) off. You only need this if you are actively seeding torrents or hosting a server and need inbound connections, so for standard browsing and privacy, you can leave it turned off.
- "Select a server to connect to"
If you look right below, it says:Use the best server according to current load and position:
For me, it's apparently NL-FREE#xxx, so that's why I named my config with
-nl. The Netherlands is fine for me, though if you want something other than the automatically suggested one, you can scroll through the list.
Download It
Once you press "Create", it shows the configuration text and a QR code.
Download the file and know that the QR code is for mobile connections via the official WireGuard
mobile app.
Once you've downloaded the .conf file, it likely has some stuff added to its name, like
in my case it's proton-nl-NL-FREE-xxx.conf. That's too long. I'll rename it to just
proton-nl.conf because it'll matter later.
Move the Config, Finally
Since WireGuard configuration files contain your private cryptographic key,
you need to move them to the system's WireGuard directory.
Do:
sudo mv ~/Downloads/your_downloaded_config.conf /etc/wireguard/
and
sudo chmod 600 /etc/wireguard/your_downloaded_config.conf
Run the VPN Now
The wireguard-tools package gives us wg-quick to spin up the
connection.
It can't get simpler than this, so just go ahead and run:
sudo resolvconf -u
This clears up any signature mismatches. Otherwise, you might get output like:
resolvconf: signature mismatch: /etc/resolv.conf resolvconf: run `resolvconf -u` to update
Then run:
sudo wg-quick up YOUR_CONFIG
For me, it's:
sudo wg-quick up proton-nl
Boom. It works! To verify the connection, you can run sudo wg to see that it's
active.
Another neat thing you run is:
curl ipinfo.io
The simplest and quickest IP lookup trick I know.
It says I'm in Rotterdam, so it's working, as expected.
If you need to turn it off, just run:
sudo wg-quick down YOUR_CONFIG