WireGuard Wrapper
Simple wrapper that makes WireGuard easier to use with VPN providers.
Table of Contents
Prerequisites
VPN providers who are offering WireGuard support. NOTE that as of right now, these providers must offer a configuration script following the original template written by Jason A. Donenfeld. To my knowledge the current VPN providers doing this are:
sudo add-apt-repository ppa:wireguard/wireguard && sudo apt-get update;
sudo apt-get install curl jq openresolv linux-headers-$(uname -r) wireguard-dkms wireguard-tools
Installation
Simply run the following commands in your terminal and follow the instructions
cd ./WireGuard-Wrapper/;
sudo ./setup.sh install
Usage
Connecting to a server
wvpn connect <server>
It is also possible to leave out server specification and connect to the default server that was set during the installation:
wvpn connect
Disconnecting from a server
wvpn disconnect
Enabling/Disabling kill-switch
wvpn kill-switch <on|off> <server>
It is also possible to pass multiple servers as arguments, or even all of them. To enable a kill-switch for all servers run:
wvpn kill-switch <on|off> all
Listing servers
When updating the server list you will be shown the current available servers. To access the list again run:
wvpn list
Status of current connection
To get more detailed information about your connection, run
wvpn status
Choosing start-up server
It is possible to choose a server that will auto connect on boot.
wvpn start-up <on|off> <server>
Updating the server list
sudo wvpn update servers
Updating default server
wvpn update default <server>
This command will let you change the default server set during the installation. Use the list
command to view the current default.
Verify connection
Verification of a connection will be done every time a connection tries to be established, To manually check the verification run:
wvpn verify
Help
wvpn help
Troubleshooting and FAQ
Connection down when resuming after sleep or hibernation
This is likely due to the network manager not using openresolv. See here for a possible solution.
Unable to remotely access local machines.
Enabling the kill switch blocks all local traffic. Either add iptable rules to circumvent this or disable the kill switch.
Was this previously the wrapper only intended for the mullvad VPN?
Yes. However, I chose to implement a more general solution.
More information
- Running WireGuard with Mullvad on Linux - Mullvad's official guide.
- Running WireGuard with AzireVPN on Linux - AzireVPN's official guide.
- WireGuard - Official WireGuard website.
Authors
Adi Hrustic
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details.