From 2331c4ad7b3e15a885a2619b9b558b6c89299dcf Mon Sep 17 00:00:00 2001 From: Callan Bryant Date: Sun, 9 Feb 2020 21:02:23 +0000 Subject: [PATCH] add README --- cmd/README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 cmd/README.md diff --git a/cmd/README.md b/cmd/README.md new file mode 100644 index 0000000..dc24533 --- /dev/null +++ b/cmd/README.md @@ -0,0 +1,39 @@ +Purpose: to allow an overview of Darksky peers and provide a mechanism to allow +easy joining + +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 up` +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. 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-info.json