diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-08-14 23:15:59 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-14 23:15:59 +0700 |
commit | 04cdcfab6775d83e6f80a5b4f45bffc8a6c4dc17 (patch) | |
tree | 6f0c2b069de8c54dbc98801f5464099b7e062006 /interface-definitions/wireguard.xml | |
parent | d822de344c8425b793e0595ba1d0a70c033d2cc3 (diff) | |
parent | 32ff96a64d351e9f72bc876f535f4898d9a08382 (diff) | |
download | vyos-1x-04cdcfab6775d83e6f80a5b4f45bffc8a6c4dc17.tar.gz vyos-1x-04cdcfab6775d83e6f80a5b4f45bffc8a6c4dc17.zip |
Merge pull request #27 from hagbard-01/current
T427, T773 adding wirguard support
Diffstat (limited to 'interface-definitions/wireguard.xml')
-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> |