Thanks to visit codestin.com
Credit goes to github.com

Skip to content

An agnostic Wireguard VPN Client that randomly selects among existing Wireguard confiugration files

License

Notifications You must be signed in to change notification settings

TSonono/wg-random

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Agnostic Wireguard VPN Client

A tool that utilizes the Wireguard CLI (wg and wg-quick) to establish a Wireguard VPN connection using Wireguard by randomly selecting a configuration file stored in /etc/wireguard

Requirements

The wg-random command must run with sudo, as root privileges are required to run the Wireguard CLI commands.

Usage

The following commands must run with sudo

# To start the vpn:
wg-random up
# To stop the vpn:
wg-random down
# To view the status of the vpn:
wg-random status

Auto-start on boot

There different ways of doing this. The approach presented here will be using systemd, but one could for instance use crontab for this as well.

Steps

  1. Verify systemd is installed on your system by running systemctl --version
  2. Copy the wg-random script to /usr/local/bin
  3. Copy the wg-random.service service file to /etc/systemd/system.
  4. Run systemctl daemon-reload
  5. Run systemctl enable wg-random.service

The service should not be started/stopped to control the status of the VPN. This is merely a way to have the VPN auto-start on boot. To start/stop the VPN after the device has been booted, the wg-random command should be executed directly.

TODO

  • Option to block non VPN communication with iptables
  • Additional option to only select among configuration files containing a certain sub-string (useful for when the name of the configuration files contains regions and/or other properties)

About

An agnostic Wireguard VPN Client that randomly selects among existing Wireguard confiugration files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages