Home

Awesome

WireGuard-Manager: Secure Your Network 💻 🖥!

🔰 Introduction

Welcome to WireGuard-Manager, your solution for setting up WireGuard, a cutting-edge VPN protocol. WireGuard is known for its speed, security, and ease of use, making it an ideal choice for both personal and professional VPN needs. This tool is designed to simplify the installation and management of WireGuard, ensuring a secure and efficient networking experience.

Quality and Reliability

Project Information and Status

Build Statuses

Contribution and Issues

Licensing

✊ Show Your Support

If you've found this project useful, please consider giving it a star and forking it. Your support is greatly appreciated!

🤷 What is VPN?

A Virtual Private Network (VPN) allows users to send and receive data through shared or public networks as if their computing devices were directly connected to the private network. Thus, applications running on an end-system (PC, smartphone, etc.) over a VPN may benefit from individual network features, protection, and management. Encryption is a standard aspect of a VPN connection but not an intrinsic one.

📶 What is WireGuard?

WireGuard is a straightforward yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general-purpose VPN for running on embedded interfaces and super computers alike, fit for many circumstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable. It is currently under a massive development, but it already might be regarded as the most secure, most comfortable to use, and the simplest VPN solution in the industry.

Why WireGuard-Manager?

⛳ Goals

🌲 Prerequisite

🚦 Getting Started

  1. Installation: Simple and quick installation process.
  2. Configuration: Easy-to-follow configuration steps.
  3. Management: User-friendly interface for managing your VPN.

Installation Guide

https://github.com/complexorganizations/wireguard-manager/assets/102563715/dd539835-2c30-4146-b4f8-940329aa6070

🐧 Installation

To ensure the successful installation of the WireGuard Manager script on various Linux systems, it's crucial to have curl and bash installed. Here's an expanded installation guide that includes instructions for installing curl and bash on different Linux distributions:

Installing curl & bash & resolvconf on Linux Systems

Debian/Ubuntu-based Systems (e.g., Ubuntu, Debian, Linux Mint):

sudo apt update
sudo apt install curl bash resolvconf

Red Hat-based Systems (e.g., CentOS, RHEL, Fedora):

sudo yum install curl bash resolvconf

or

sudo dnf install curl bash resolvconf

Arch-based Systems (e.g., Arch Linux, Manjaro):

sudo pacman -Sy curl bash resolvconf

Alpine Linux:

sudo apk update
sudo apk add curl bash resolvconf

Other Distributions:

For other Linux distributions, you can use the package manager specific to that distribution to install curl & bash & resolvconf. The package names may vary slightly.

Installing WireGuard Manager Script

Now that you have curl and bash installed, you can proceed with installing the WireGuard Manager script using the provided instructions:

  1. First, use curl to download the script and save it in /usr/local/bin/:

    curl https://raw.githubusercontent.com/complexorganizations/wireguard-manager/main/wireguard-manager.sh --create-dirs -o /usr/local/bin/wireguard-manager.sh
    
  2. Next, make the script user executable:

    chmod +x /usr/local/bin/wireguard-manager.sh
    
  3. Finally, execute the script:

    bash /usr/local/bin/wireguard-manager.sh
    

Connecting to WireGuard Interface

In your /etc/wireguard/clients directory, you will find .conf files. These are the peer configuration files. Download them from your WireGuard Interface and connect using your favorite WireGuard Peer.

🔑 Usage

usage: bash /usr/local/bin/wireguard-manager.sh # --install
  --install     Installs the WireGuard interface on your system
  --start       Starts the WireGuard interface if it's not already running
  --stop        Stops the WireGuard interface if it's currently running
  --restart     Restarts the WireGuard interface
  --list        Lists all the peers currently connected to the WireGuard interface
  --add         Adds a new peer to the WireGuard interface
  --remove      Removes a specified peer from the WireGuard interface
  --reinstall   Reinstalls the WireGuard interface, keeping the current configuration
  --uninstall   Uninstalls the WireGuard interface from your system
  --update      Updates the WireGuard Manager to the latest version
  --ddns        Updates the IP address of the WireGuard interface using Dynamic DNS
  --backup      Creates a backup of your current WireGuard configuration
  --restore     Restores the WireGuard configuration from a previous backup
  --purge       Removes all peers from the WireGuard interface
  --help        Displays this usage guide

🥰 Features

💡 Configuration Options

👉👈 Compatibility with Linux Distributions

Operating Systemi386 Supportamd64 Supportarmhf Supportarm64 Support
Ubuntu 14 and belowNoNoNoNo
Ubuntu 16 and aboveYesYesYesYes
Debian 7 and belowNoNoNoNo
Debian 8 and aboveYesYesYesYes
CentOS 6 and belowNoNoNoNo
CentOS 7 and aboveYesYesYesYes
Fedora 29 and belowNoNoNoNo
Fedora 30 and aboveYesYesYesYes
RedHat 6 and belowNoNoNoNo
RedHat 7 and aboveYesYesYesYes
Kali 1.0 and belowNoNoNoNo
Kali 1.1 and aboveYesYesYesYes
Arch LinuxYesYesYesYes
RaspbianYesYesYesYes
PopOSYesYesYesYes
ManjaroYesYesYesYes
MintYesYesYesYes
AlmaLinuxYesYesYesYes
AlpineYesYesYesYes
FreeBSDYesYesYesYes
KDE NeonYesYesYesYes
Rocky LinuxYesYesYesYes
Oracle LinuxYesYesYesYes

☁️ Compatibility with Cloud Providers

CloudSupported
AWSYes
Google CloudYes
LinodeYes
Digital OceanYes
VultrYes
Microsoft AzureYes
OpenStackYes
RackspaceYes
ScalewayYes
EuroVPSYes
Hetzner CloudNo
StratoNo

🛡️ Compatibility with Virtualization

VirtualizationSupported
KVMYes
NoneYes
QemuYes
LXCYes
MicrosoftYes
VmwareYes
OpenVZNo
DockerNo
WSLNo

💻 Compatibility with Linux Kernel

KernelCompatibility
Linux Kernel 3.0 and belowNo
Linux Kernel 3.1 and aboveYes

🙋 Frequently Asked Questions

Which hosting providers do you recommend?

Which WireGuard clients do you recommend?

Additional Information

Where can I access comprehensive WireGuard documentation?

How can I install WireGuard without interactive prompts for a headless installation?

Are there any alternatives to self-hosting a VPN?

Why is all the code centralized in one place?

Which port and protocol does WireGuard require?

Do I need to forward any ports for Unbound?

What does the content blocker restrict?

What information is collected and how is it used?

Setting Up Your Own VPN Server

To set up your own VPN server, you will need the following items:

Raspberry Pi 5 Setup Components

Estimated Cost for Building Your Own VPN

WireGuard Resources

VPN Speed Comparison

This section compares the internet speed differences between using no VPN, WireGuard, and OpenVPN.

No VPN (Normal Connection)

No VPN Speed Test

WireGuard Speed Test

Wireguard Speed Test

OpenVPN Speed Test

OpenVPN Speed Test

🙅 Content-Blocking vs. No Content-Blocking

https://user-images.githubusercontent.com/16564273/125283630-9845d180-e2e6-11eb-8b7d-f30a8f2eae8a.mp4

📐 Architecture

Wireguard Manager Architecture

🤝 Code Development

Develop Code Without Cloning the Repository

You can directly work on the code without the need to clone the repository. This is facilitated by Visual Studio Code's online platform. By clicking the link below, you can preview and edit the code in your browser, leveraging the intuitive interface of Visual Studio Code. This method streamlines the development process, particularly for those who want to make quick modifications or do not wish to set up the entire repository on their local machine.

Open in Visual Studio Code

🐛 Code Debugging

Detailed Debugging Process After Cloning the Repository

For a comprehensive debugging process, you might want to clone the repository to your local system. This method allows you to thoroughly test and debug the code in your environment. Follow these steps to clone the repository and start the debugging process:

  1. Clone the Repository: Use the Git command to clone the repository to your preferred directory, such as /root/ in this example. This step copies all the code from the online repository to your local machine.
git clone https://github.com/complexorganizations/wireguard-manager /root/
  1. Start Debugging: After cloning, navigate to the script's directory and initiate the debugging process. The script will be executed in debug mode, providing detailed output of each step. This output is redirected to a log file for easier examination. The log file, located in the same directory, stores all the debugging information, making it easy to trace any issues or understand the script's behavior.
bash -x /root/wireguard-manager/wireguard-manager.sh >>/root/wireguard-manager/wireguard-manager.log

Following these steps, you can either quickly modify the code online without cloning or perform a more comprehensive debugging process by cloning the repository to your local machine. Each method offers different benefits depending on your needs and the extent of your work with the WireGuard Manager script.

Detailed Debugging Guide for WireGuard Manager

  1. Setting Up the Environment

    • Ensure that all necessary software, including Git, Bash, and any dependencies required by WireGuard Manager, are installed on your system.
    • While Visual Studio Code is used in this example, you can use any IDE that supports Git and Bash.
  2. Cloning the Repository

    • Use Git to clone the WireGuard Manager repository to a local directory: git clone https://github.com/complexorganizations/wireguard-manager /path/to/local-directory
    • Avoid using root directories for development. Choose a user directory for better safety and permission management.
  3. Understanding the Codebase

    • Review the code to understand its structure, conventions, and documentation.
    • Check for a README file or wiki pages in the repository that might provide insights into the codebase.
  4. Setting Up Debugging Tools

    • Configure the debugging tools in your IDE. Set breakpoints, watch variables, and use step-through debugging features.
    • Ensure that logging is correctly set up in the script to capture sufficient details for debugging.
  5. Running the Script in Debug Mode

    • Run the script with bash -x to get detailed trace outputs: bash -x /path/to/local-directory/wireguard-manager/wireguard-manager.sh >> /path/to/local-directory/wireguard-manager.log
    • Regularly check the log file for errors or unexpected behavior.
  6. Testing in Different Environments

    • Test the script in isolated environments like Docker containers or VMs to understand its behavior in different settings.
    • If possible, test on different operating systems to ensure compatibility.
  7. Collaborating and Seeking Feedback

    • Commit changes to a new branch and use pull requests for reviews.
    • Request code reviews from peers to get different perspectives on potential issues.
  8. Documenting Your Findings

    • If you discover undocumented behavior or fixes, update the project documentation.
    • Use the repository's issue tracker to report bugs or suggest enhancements.
  9. Automating Testing

    • Create automated tests for critical functionalities to catch bugs early.
    • Use CI tools to automate testing with every commit or pull request.
  10. Staying Updated with the Repository

    • Regularly update your local repository with changes from the main project to stay in sync and avoid conflicts.

By following these steps and adapting them to their own development environment and workflow, developers can more effectively debug and contribute to the WireGuard Manager project. This comprehensive approach caters to various skill levels and preferences, thereby facilitating a more inclusive and efficient development process.

💋 Acknowledgements

This project is made possible thanks to the Open Source Community.

📱 Community and Contributions

Join our community on Discord and Slack to contribute to the project, share ideas, and get help.

🤝 Sponsors

This project is sponsored by

Digital Ocean Google Cloud AWS Linode

Backup

https://gitlab.com/complexorganizations/wireguard-manager

📝 License

WireGuard-Manager is licensed under the Apache License Version 2.0. For more details, please refer to our License File.