User:Zyzzek/Surfshark

From ArchWiki

Surfshark is a commercial VPN service.

Use

Surfshark provides GUI clients for various operating systems, however only a .deb package is available for Linux which is not compatible with Arch-based distributions.

The Surfshark website provides instructions for use on Manjaro here, but they are not fully applicable for a general Arch Linux installation.

More general instructions are as follows:

  1. Install your desired OpenVPN package and openvpn-update-resolv-conf-gitAUR
  2. Partially follow the Manjaro instructions mentioned above in order to download the Surfshark configuration files and note the username and password credentials. The certificates are not needed.
  3. You can use the following script after filling out your username and password in the bold locations. Provide the configuration file of the desired VPN location as the first argument to the script.
#!/bin/bash

sudo bash -c "openvpn --config <(echo -e \"redirect-gateway def1 bypass-dhcp ipv6\\nscript-security 2\\nup /etc/openvpn/update-resolv-conf\\ndown /etc/openvpn/update-resolv-conf\" | cat $1 -) --auth-user-pass <(echo -e \"Your Username\\nYour Password\")"

The script uses process substitution to provide the user name and password and to edit the given configuration file. The edits are required to route traffic through the VPN and to reference the update-resolv-conf script to route DNS through the VPN.