diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-08-26 18:16:40 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-08-26 18:16:40 +0200 |
commit | 5545782bd2ffb4f715699c4a2a343462e916faca (patch) | |
tree | 245e5090ff713b0ddddd5e19364720e01dac734c /op-mode-definitions/wireguard.xml | |
parent | ffc8d1f4666874bd2641be54fc16515daf065985 (diff) | |
parent | 23022977a6bf94e6be7d37de04c97ab0b5d1ea35 (diff) | |
download | vyos-1x-5545782bd2ffb4f715699c4a2a343462e916faca.tar.gz vyos-1x-5545782bd2ffb4f715699c4a2a343462e916faca.zip |
Merge branch 'current' of https://github.com/vyos/vyos-1x into current
Diffstat (limited to 'op-mode-definitions/wireguard.xml')
-rw-r--r-- | op-mode-definitions/wireguard.xml | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/op-mode-definitions/wireguard.xml b/op-mode-definitions/wireguard.xml new file mode 100644 index 000000000..a7e156d8d --- /dev/null +++ b/op-mode-definitions/wireguard.xml @@ -0,0 +1,76 @@ +<?xml version="1.0"?> +<!-- wireguard key management --> +<interfaceDefinition> + <node name="generate"> + <children> + <node name="wireguard"> + <properties> + <help>wireguard key generation utility</help> + </properties> + <children> + <leafNode name="keypair"> + <properties> + <help>generate a wireguard keypair</help> + </properties> + <command>${vyos_op_scripts_dir}/wireguard_key.py --genkey</command> + </leafNode> + </children> + </node> + </children> + </node> + <node name="show"> + <children> + <node name="wireguard"> + <children> + <leafNode name="pubkey"> + <properties> + <help>show wireguard public key</help> + </properties> + <command>${vyos_op_scripts_dir}/wireguard_key.py --showpub</command> + </leafNode> + <leafNode name="privkey"> + <properties> + <help>show wireguard private key</help> + </properties> + <command>${vyos_op_scripts_dir}/wireguard_key.py --showpriv</command> + </leafNode> + </children> + </node> + <node name="interfaces"> + <children> + <tagNode name="wireguard"> + <properties> + <help>show wireguard interface information</help> + <completionHelp> + <script>${vyos_completion_dir}/list_interfaces.py -t wireguard</script> + </completionHelp> + </properties> + <command>sudo wg show "$4"</command> + <children> + <leafNode name="allowed-ips"> + <properties> + <help>show all allowed-ips for the specified interface</help> + </properties> + <command>sudo wg show "$4" allowed-ips</command> + </leafNode> + <leafNode name="endpoints"> + <properties> + <help>show all endpoints for the specified interface</help> + </properties> + <command>sudo wg show "$4" endpoints</command> + </leafNode> + <leafNode name="peers"> + <properties> + <help>show all peer IDs for the specified interface</help> + </properties> + <command>sudo wg show "$4" peers</command> + </leafNode> + <!-- more commands upon request --> + </children> + </tagNode> + </children> + </node> + </children> + </node> +</interfaceDefinition> + |