diff options
author | hagbard <vyosdev@derith.de> | 2018-08-12 12:41:25 -0700 |
---|---|---|
committer | hagbard <vyosdev@derith.de> | 2018-08-12 12:42:23 -0700 |
commit | 32ff96a64d351e9f72bc876f535f4898d9a08382 (patch) | |
tree | d5b6b978d84cb5c949b1f35af3f90a2e95e16f2f /interface-definitions | |
parent | 87e5994008cfcb62e584a94fc4c82152339c2a4f (diff) | |
download | vyos-1x-32ff96a64d351e9f72bc876f535f4898d9a08382.tar.gz vyos-1x-32ff96a64d351e9f72bc876f535f4898d9a08382.zip |
T427: wireguard support
Diffstat (limited to 'interface-definitions')
-rw-r--r-- | interface-definitions/wireguard.xml | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/interface-definitions/wireguard.xml b/interface-definitions/wireguard.xml new file mode 100644 index 000000000..008f82a0b --- /dev/null +++ b/interface-definitions/wireguard.xml @@ -0,0 +1,78 @@ +<?xml version="1.0"?> +<interfaceDefinition> + <node name="interfaces"> + <children> + <tagNode name="wireguard" owner="${vyos_conf_scripts_dir}/wireguard.py"> + <properties> + <help>WireGuard interface name</help> + <priority>459</priority> <!-- subsequent ones may be removed, just make sure ethernet ifs are present --> + <constraint> + <regex>^wg[0-9]{1,4}</regex> + </constraint> + <constraintErrorMessage>illegal interface name</constraintErrorMessage> + <valueHelp> + <format>wgN</format> + <description>WireGuard interface name</description> + </valueHelp> + </properties> + <children> + <leafNode name="address"> + <properties> + <help>IP address</help> + <valueHelp> + <format>ipv4net</format> + <description>IPv4 address and prefix length</description> + </valueHelp> + <valueHelp> + <format>ipv6net</format> + <description>IPv6 address and prefix length</description> + </valueHelp> + <multi/> + <constraint> + <validator name="interface-address"/> + </constraint> + </properties> + </leafNode> + <leafNode name="description"> + <properties> + <help>description</help> + <constraint> + <regex>.[^ ]{1,100}$</regex> + </constraint> + <constraintErrorMessage>interface description is too long (limit 100 characters)</constraintErrorMessage> + </properties> + </leafNode> + <leafNode name="listen-port"> + <properties> + <help>Local port number to accept connections</help> + </properties> + </leafNode> + <tagNode name="peer"> + <properties> + <help>Base64 encoded public key</help> + <constraint> + <regex>^[0-9a-zA-Z\+/]{43}=$</regex> + </constraint> + <constraintErrorMessage>Key is not valid 44-character (32-bytes) base64</constraintErrorMessage> + </properties> + <children> + <leafNode name="allowed-ips"> + <properties> + <help>IP addresses allowed to traverse the peer</help> + <multi/> + </properties> + </leafNode> + <!-- check format IP:port --> + <leafNode name="endpoint"> + <properties> + <help>Remote endpoint</help> + </properties> + </leafNode> + + </children> + </tagNode> + </children> + </tagNode> + </children> + </node> +</interfaceDefinition> |