Wg-configurator - This project makes it easier to configure a fleet of servers interconnected via the WireGuard point-to-point virtual private network.

WireGuard Configurator

This project makes it easier to configure a fleet of servers interconnected via the WireGuard point-to-point virtual private network.

License

Copyright (c) 2021 Caleb L. Power. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for specific language governing permissions and limitations under the License.

About

This project came about for two reasons. First, I needed to add the Go and Rust programming languages to my toolbox, and I tend to learn languages quickly when I apply the to something that's actually useful-- I don't like busy work. Second, I really wanted to stop manually reconfiguring WireGuard's configuration files for each individual machine when I could automate the process. Sure, I could probably work some NAT magic, and I still might in the future, but this seemed quicker, more useful (see reason #1), and ultimately, more fun. So, keep that in mind when reviewing the code quality-- it'll be cleaned up in the future (probably).

Disclaimer

This product should not be used in a production environment at this time.

Contributions

Contributions of good quality are welcome. However, please do not assume that pull requets will be automatically accepted.

Build and Execution

This repository contains wgconfig-server (written in Go) and wgconfig-agent (written in Rust). The former serves to manage the various configurations for all machines in a particular environment, and the latter serves to update its respective host. Therefore, building requires that your environment contain both go and rustc (and cargo for the latter, for that matter).

wgconfig-server

You can build this out by entering the wgconfig-server directory and executing go install or go build (the latter for portable builds). Then, execute the binary directly to see the various command-line arguments. Data is stored in a SQLite database (not my first choice, but I wanted to learn to use that as well), and the name of the SQLite database file corresponds to the environment that is specified. (An environment, in this case, corresponds to a WireGuard interface.)

wgconfig-agent

You can build this one by entering the wgconfig-agent directory and executing cargo build --release. If you do that, the release binary will end up in the target/release folder.

This one should probably run on a cron job, so here are some exit codes to assist with that:

  • 0 indicates that the job ran successfully and the configs were updated
  • 1 indicates that the job ran, but could not retrieve the new config
  • 2 indicates that the job ran successfully, but no configs were changed
  • 101 indicates that the user should read the instructions or something
Similar Resources

This library provides a simple framework of microservice, which includes a configurator, a logger, metrics, and of course the handler

Microservice The framework for the creation of microservices, written in Golang. (note: http microservice) Architecture microservice includes: handle

Dec 30, 2022

Map downloader and configurator for KillingFloor 2

kf2-map-config Copy the kf2-map-config.exe and maps.txt into the Killing Floor2

Jul 2, 2022

Arbitrum is a Layer 2 cryptocurrency platform that makes smart contracts scalable, fast, and private.

Arbitrum is a Layer 2 cryptocurrency platform that makes smart contracts scalable, fast, and private.

Arbitrum is a Layer 2 cryptocurrency platform that makes smart contracts scalable, fast, and private. Arbitrum interoperates closely with Ethereum, so Ethereum developers can easily cross-compile their contracts to run on Arbitrum. Arbitrum achieves these goals through a unique combination of incentives, network protocol design, and virtual machine architecture.

Jan 8, 2023

Virtual-Operating-System - Virtual Operating System Using Golang And Fyne Implemented Gallery app

Virtual-Operating-System - Virtual Operating System Using Golang And Fyne Implemented Gallery app

Virtual Operating System Virtual Operating System Using Golang And Fyne Implemen

Jan 1, 2022

Webserver I built to serve Infura endpoints. Deployable via k8s and AWS EKS. Load testable via k6 tooling, and montiorable via prometheus and grafana

Infura Web Server Welcome to my verion of the take home project. I've created a webserver written in go to serve Infura api data over 3 possible data

Nov 15, 2022

Terratest is a Go library that makes it easier to write automated tests for your infrastructure code.

Terratest is a Go library that makes it easier to write automated tests for your infrastructure code. It provides a variety of helper functions and patterns for common infrastructure testing tasks,

Dec 30, 2022

A tiny markup language for terminal output. Makes formatting output in CLI apps easier!

A tiny markup language for terminal output. Makes formatting output in CLI apps easier!

tml - Terminal Markup Language A Go module (and standalone binary) to make the output of coloured/formatted text in the terminal easier and more reada

Dec 14, 2022

A command-line tool that makes git easier to use with GitHub.

hub is a command line tool that wraps git in order to extend it with extra features and commands that make working with GitHub easier. For an official

Jan 1, 2023

Lightweight package that makes easier and safer to deal with environment variables.

Envisage A lightweight package that makes easier and safer to deal with environment variables. Example Try it on On GoPlay https://goplay.tools/snippe

Apr 11, 2022

LTF is a minimal, transparent Terraform wrapper. It makes Terraform projects easier to work with.

LTF Status: alpha LTF is a minimal, transparent Terraform wrapper. It makes Terraform projects easier to work with. In standard Terraform projects, th

Nov 19, 2022

An anonymous, encrypted Point-to-Point (Layer 3) tunnel between two peers.

NKN-Link An anonymous, encrypted Point-to-Point (Layer 3) tunnel between two peers. NKN-Link Table of Contents Preface Description Install Setup Run P

Dec 20, 2022

Configure is a Go package that gives you easy configuration of your project through redundancy

Configure Configure is a Go package that gives you easy configuration of your project through redundancy. It has an API inspired by negroni and the fl

Sep 26, 2022

Kilo is a multi-cloud network overlay built on WireGuard and designed for Kubernetes (k8s + wg = kg)

Kilo Kilo is a multi-cloud network overlay built on WireGuard and designed for Kubernetes. Overview Kilo connects nodes in a cluster by providing an e

Jan 1, 2023

Go driver for PostgreSQL over SSH. This driver can connect to postgres on a server via SSH using the local ssh-agent, password, or private-key.

pqssh Go driver for PostgreSQL over SSH. This driver can connect to postgres on a server via SSH using the local ssh-agent, password, or private-key.

Nov 6, 2022

tendermint private key provider experiment that wraps cosmovisor and passes the priv key via named pipe.

ssm-cosmovisor You probably don't want to use this and do so at your own risk. This is very experimental and completely untested. It will likely: set

Jul 3, 2022

Cross check makes health checks on PostgreSQL and MySQL database servers

Cross Check Cross check makes health checks on PostgreSQL and MySQL database servers, it also performs master & slave control for clusters in H/A Acti

Jan 14, 2022

Fleet - Open source device management, built on osquery.

Fleet - Open source device management, built on osquery.

Fleet - Open source device management, built on osquery.

Dec 30, 2022

draft terraform provider for Fleet

Fleet Terraform provider This repo is a proof of concept of how a fleet provider for terraform could work Build provider Run the following command to

Oct 5, 2021

This simple service's purpose is to expose data regarding a vehicle fleet

A Small API This simple service's purpose is to expose data regarding a vehicle

Dec 16, 2021
Configure is a Go package that gives you easy configuration of your project through redundancy

Configure Configure is a Go package that gives you easy configuration of your project through redundancy. It has an API inspired by negroni and the fl

Sep 26, 2022
tendermint private key provider experiment that wraps cosmovisor and passes the priv key via named pipe.

ssm-cosmovisor You probably don't want to use this and do so at your own risk. This is very experimental and completely untested. It will likely: set

Jul 3, 2022
ezd is an easy to configure docker-based task runner system

ezd - eZ Docker Task Runner ezd is an easy to configure docker-based task runner system. Getting started Create an ezd.yml file in your project root:

Feb 11, 2022
An awesome command-line tool to manage Wireguard configurations.

wg-manage A command line tool to centrally manage Wireguard configuration files - all config options are stored in one YAML file that is then used to

Sep 9, 2022
Genv is a library for Go (golang) that makes it easy to read and use environment variables in your projects. It also allows environment variables to be loaded from the .env file.

genv Genv is a library for Go (golang) that makes it easy to read and use environment variables in your projects. It also allows environment variables

Dec 21, 2022
Project my config into your prebuild

Projector A simple key value store per path. Building From Source git clone [email protected]:ThePrimeagen/projector.git cd projector # Install it where

Jun 23, 2022
Connect your devices into a single private WireGuard®-based mesh network.

Wiretrustee A WireGuard®-based mesh network that connects your devices into a single private network. Why using Wiretrustee? Connect multiple devices

Dec 31, 2022
🐉 Simple WireGuard proxy with minimal overhead for WireGuard traffic.

swgp-go ?? Simple WireGuard proxy with minimal overhead for WireGuard traffic. Proxy Modes 1. Zero overhead Simply AES encrypt the first 16 bytes of a

Jan 8, 2023
go HTTP client that makes it plain simple to configure TLS, basic auth, retries on specific errors, keep-alive connections, logging, timeouts etc.

goat Goat, is an HTTP client built on top of a standard Go http package, that is extremely easy to configure; no googling required. The idea is simila

Jun 25, 2022
A tool that makes vendoring your project easier to do

vendorme Vendorme is a tool that makes vendoring your project easier to do. It improves the developer workflow by giving you one single place to manag

Dec 16, 2022