5
0
mirror of https://github.com/cwinfo/yggdrasil-network.github.io.git synced 2024-09-19 16:09:36 +00:00

Add addRoute, removeRoute, addSourceSubnet, removeSourceSubnet

This commit is contained in:
Neil Alexander 2018-12-09 12:53:50 +00:00
parent a355c2958a
commit c0ae35f3ba
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944
2 changed files with 49 additions and 3 deletions

View File

@ -230,3 +230,49 @@ Expects no additional request fields.
Returns zero or more strings containing the enabled multicast peering interfaces.
If zero strings are returned then it is implied that multicast peering is not allowed on any interface.
#### `addRoute`
Expects:
- `subnet=` `string` for the subnet to route
- `box_pub_key=` `string` for the public key to route to
Adds a new crypto-key route.
Returns:
- Zero or more successful `string` routes in the `"added"` section
- Zero or more failed `string` routes in the `"not_added"` section
#### `removeRoute`
Expects:
- `subnet=` `string` for the subnet to remove the route route for
- `box_pub_key=` `string` for the public key that is routed to
Removes an existing crypto-key route.
Returns:
- Zero or more successful `string` routes in the `"removed"` section
- Zero or more failed `string` routes in the `"not_removed"` section
#### `addSourceSubnet`
Expects:
- `subnet=` `string` for the subnet to allow traffic from
Adds a new crypto-key source subnet.
Returns:
- Zero or more successful `string` source subnets in the `"added"` section
- Zero or more failed `string` source subnets in the `"not_added"` section
#### `removeSourceSubnet`
Expects:
- `subnet=` `string` for the subnet to remove
Removes an existing crypto-key source subnet.
Returns:
- Zero or more successful `string` source subnets in the `"removed"` section
- Zero or more failed `string` source subnets in the `"not_removed"` section

View File

@ -16,14 +16,14 @@ If you installed Yggdrasil through one of the platform packages (i.e. macOS, Deb
Otherwise, you can generate a configuration file in the following ways:
- **HJSON**: `yggdrasil -genconf > /etc/yggdrasil.conf`
- **JSON**: `yggdrasil -genconf -json > /etc/yggdrasil.conf`
- **Generate HJSON**: `yggdrasil -genconf > /etc/yggdrasil.conf`
- **Generate JSON**: `yggdrasil -genconf -json > /etc/yggdrasil.conf`
## Using Configuration
Yggdrasil can accept a configuration file either through `stdin` or by being given a path on the filesystem to a configuration file:
- **Using `stdin`**: `yggdrasilctl --useconf < /etc/yggdrasil.conf`
- **Using stdin**: `yggdrasilctl --useconf < /etc/yggdrasil.conf`
- **Using file:** `yggdrasilctl --useconffile /etc/yggdrasil.conf`
## Normalising Configuration