Update README with usage

master
Ambrose Chua 2019-12-21 10:50:10 +00:00
parent 913b201ca2
commit 93073c4d8e
1 changed files with 8 additions and 4 deletions

View File

@ -26,14 +26,14 @@ The primary scenario this tool is going to be used for is to manage machines usi
# Usage
> TODO
# Operation
## Server
The "server" manages a WireGuard interface, ~~treating a WireGuard configuration file as a database~~ (TODO). It assumes this interface and configuration exists. It only adds new peers to the configuration file and interface, and does not delete existing configuration.
```
wireguard-negotiator server --endpoint wireguard-endpoint:port
```
The "server" also exposes the HTTP server with the following endpoints:
### `POST /request`
@ -68,3 +68,7 @@ The "client" sets up a WireGuard interface, and relies on network backends to do
- `networkd`: Creates a `systemd.netdev` file in `/etc/systemd/network`
It does so by performing `POST /request` to the "server".
```
wireguard-negotiator request --server https://url-of-server
```