summaryrefslogtreecommitdiff
path: root/op-mode-definitions/wireguard.xml
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-09-11 23:14:46 +0200
committerDaniil Baturin <daniil@baturin.org>2019-09-11 23:14:46 +0200
commita9a68a6f1086fd4c978deaf5ddace69c18443756 (patch)
treef3da329903d4e758408851f9b22c4834c130363f /op-mode-definitions/wireguard.xml
parent501908ae54a1aaae1337673617ebfcc281b02662 (diff)
parent59e5e64cfbb67a5eb1a9d4d21dd54d946897b8d7 (diff)
downloadvyos-1x-a9a68a6f1086fd4c978deaf5ddace69c18443756.tar.gz
vyos-1x-a9a68a6f1086fd4c978deaf5ddace69c18443756.zip
Merge branch 'current' into equuleus
Diffstat (limited to 'op-mode-definitions/wireguard.xml')
-rw-r--r--op-mode-definitions/wireguard.xml71
1 files changed, 55 insertions, 16 deletions
diff --git a/op-mode-definitions/wireguard.xml b/op-mode-definitions/wireguard.xml
index 681bb5f47..c5c4c9914 100644
--- a/op-mode-definitions/wireguard.xml
+++ b/op-mode-definitions/wireguard.xml
@@ -8,18 +8,24 @@
<help>wireguard key generation utility</help>
</properties>
<children>
- <leafNode name="keypair">
+ <leafNode name="default-keypair">
<properties>
- <help>generate a wireguard keypair</help>
+ <help>generates the wireguard default-keypair</help>
</properties>
- <command>${vyos_op_scripts_dir}/wireguard.py --genkey</command>
+ <command>sudo ${vyos_op_scripts_dir}/wireguard.py --genkey</command>
</leafNode>
<leafNode name="preshared-key">
<properties>
<help>generate a wireguard preshared key</help>
</properties>
<command>${vyos_op_scripts_dir}/wireguard.py --genpsk</command>
- </leafNode>
+ </leafNode>
+ <tagNode name="named-keypairs">
+ <properties>
+ <help>Generates named wireguard keypairs</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/wireguard.py --genkey --location "$4"</command>
+ </tagNode>
</children>
</node>
</children>
@@ -31,18 +37,31 @@
<help>Show wireguard properties</help>
</properties>
<children>
- <leafNode name="pubkey">
- <properties>
- <help>show wireguard public key</help>
- </properties>
- <command>${vyos_op_scripts_dir}/wireguard.py --showpub</command>
- </leafNode>
- <leafNode name="privkey">
+ <node name="keypairs">
<properties>
- <help>show wireguard private key</help>
+ <help>Shows named wireguard keys</help>
</properties>
- <command>${vyos_op_scripts_dir}/wireguard.py --showpriv</command>
- </leafNode>
+ <children>
+ <tagNode name="pubkey">
+ <properties>
+ <help>Show wireguard private named key</help>
+ <completionHelp>
+ <script>${vyos_op_scripts_dir}/wireguard.py --listkdir</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/wireguard.py --showpub --location "$5"</command>
+ </tagNode>
+ <tagNode name="privkey">
+ <properties>
+ <help>Show wireguard public named key</help>
+ <completionHelp>
+ <script>${vyos_op_scripts_dir}/wireguard.py --listkdir</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/wireguard.py --showpriv --location "$5"</command>
+ </tagNode>
+ </children>
+ </node>
</children>
</node>
<node name="interfaces">
@@ -51,7 +70,7 @@
<properties>
<help>show wireguard interface information</help>
<completionHelp>
- <script>${vyos_completion_dir}/list_interfaces.py -t wireguard</script>
+ <script>${vyos_completion_dir}/list_interfaces.py --type wireguard</script>
</completionHelp>
</properties>
<command>sudo wg show "$4"</command>
@@ -74,12 +93,32 @@
</properties>
<command>sudo wg show "$4" peers</command>
</leafNode>
- <!-- more commands upon request -->
+ <!-- more commands upon request -->
</children>
</tagNode>
</children>
</node>
</children>
</node>
+ <node name="delete">
+ <children>
+ <node name="wireguard">
+ <properties>
+ <help>Delete wireguard properties</help>
+ </properties>
+ <children>
+ <tagNode name="keypair">
+ <properties>
+ <help>Delete a wireguard keypair</help>
+ <completionHelp>
+ <script>${vyos_op_scripts_dir}/wireguard.py --listkdir</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/wireguard.py --delkdir --location "$4"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
</interfaceDefinition>