Skip to content

Simple wrapper that makes WireGuard easier to use with VPN providers.

License

Notifications You must be signed in to change notification settings

hcm82/WireGuard-Wrapper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WireGuard Wrapper

Simple wrapper that makes WireGuard easier to use with VPN providers.

Table of Contents

  1. Prerequisites
  2. Installation
  3. Usage
    1. Connecting
    2. Disconnecting
    3. Kill-switch configuration
    4. Listing servers
    5. Connection status
    6. Choosing start-up server
    7. Updating server list
    8. Updating default server
  4. Troubleshooting
  5. More Information
  6. Authors
  7. License

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

Authors

Adi Hrustic

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details.

About

Simple wrapper that makes WireGuard easier to use with VPN providers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%