From 57002288deeb1cff214ca93094c0168db07b4a85 Mon Sep 17 00:00:00 2001 From: Callan Bryant Date: Mon, 2 Mar 2020 18:15:34 +0000 Subject: [PATCH] update README --- README.md | 51 +++++++++++++-------------------------------------- 1 file changed, 13 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index a077c6a..79c4d2b 100644 --- a/README.md +++ b/README.md @@ -2,45 +2,20 @@ Purpose: to allow an overview of Darksky peers and provide a mechanism to allow easy joining +dsnet is a simple tool to manage a wireguard VPN. -OUT OF DATE. See help cmd. + Usage: dsnet + + Available commands: + + init : Create /etc/dsnet-config.json containing default configuration + new keys without loading. Edit to taste. + add : Generate configuration for a new peer, adding to /etc/dsnet-config.json. Send with passworded ffsend. + sync : Synchronise wireguard configuration with /etc/dsnet-config.json, creating and activating interface if necessary. + report : Generate a JSON status report to the location configured in /etc/dsnet-config.json. + + To remove an interface or bring it down, use standard tools such as iproute2. + To modify or remove peers, edit /etc/dsnet-config.json and then run sync. - -Could use https://github.com/WireGuard/wgctrl-go + json database. -Root separation by file deposit. - -Single executable that behaves much like wg-quick. Not a service, just a -helper. - -`dsnet init` -Creates the config file /etc/dsnet.json defining subnet, creating private key, -etc. - -`dsnet sync` -Loads peers from JSON file /etc/dsnet.json and brings the interface online. If -interface is already online, synchronises peers by adding/removing. Interface -name in file, dsnet. Runs commands to add routes/forwarding/whatever. - -`dsnet down` -Brings the interface down after disassociating all peers. - -`dsnet add` -Add a peer by name. Returns a config file as QR code or file as specified. If -public key is specified, private key won't be generated. Editing/removing a -peer can be done by editing the JSON file. - -QR code + confirmation prompt on stderr, peer info on stdout. - -https://magic-wormhole.readthedocs.io/ (or another "secure" mechanismmechanism -such https://github.com/timvisee/ffsend) could be used to transfer the config -to allow invites. - -`dsnet report` -Generates a JSON report listing peers by name, transfer rate, online status, IP -etc. The JSON is intended to be consumed by a hugo template as a data source. -Could also be updated via XHR/websockets. - -Report is intended to be generated every minute by cron running as root. The -webserver can then read the file. Location /var/lib/dsnet-report.json +To send configurations, ffsend (with separately transferred password) or a local QR code generator may be used.