From 67735316cc50b568f8a6382e0ba581068be987f9 Mon Sep 17 00:00:00 2001 From: Gagan Deep Date: Thu, 22 Aug 2024 13:14:24 +0530 Subject: [PATCH 1/3] [docs] Added all supported paramenters of WireGuard backend #297 Closes #297 --- docs/source/backends/wireguard.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/source/backends/wireguard.rst b/docs/source/backends/wireguard.rst index 104308f3b..81e33c2c9 100644 --- a/docs/source/backends/wireguard.rst +++ b/docs/source/backends/wireguard.rst @@ -103,6 +103,20 @@ key name type default allowed values underscores ``port`` integer ``51820`` integers ``private_key`` string base64-encoded private key +``dns`` list ``[]`` list of strings containing DNS servers +``mtu`` integer ``1280`` MTU set on the interface +``table`` string ``auto`` Controls the routing table to which routes are + added +``pre_up`` string Script snippet which will be executed before + setting up the interface. +``post_up`` string Script snippet which will be executed after setting + up the interface. +``pre_down`` string Script snippet which will be executed before + tearing down the interface. +``post_down`` string Script snippet which will be executed after tearing + down the interface. +``save_config`` boolean ``false`` Save the configuration from the current state of + interface upon shutdown. ``peers`` list ``[]`` list of dictionaries containing following information of each peer: From 85db9475afbbcbe8ea92e8d2538990e683c1085f Mon Sep 17 00:00:00 2001 From: Gagan Deep Date: Fri, 23 Aug 2024 12:25:45 +0530 Subject: [PATCH 2/3] [req-changes] Updated WireGuard MTU --- docs/source/backends/wireguard.rst | 2 +- netjsonconfig/backends/wireguard/schema.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/source/backends/wireguard.rst b/docs/source/backends/wireguard.rst index 81e33c2c9..e3f38d1c4 100644 --- a/docs/source/backends/wireguard.rst +++ b/docs/source/backends/wireguard.rst @@ -104,7 +104,7 @@ key name type default allowed values ``port`` integer ``51820`` integers ``private_key`` string base64-encoded private key ``dns`` list ``[]`` list of strings containing DNS servers -``mtu`` integer ``1280`` MTU set on the interface +``mtu`` integer ``1420`` Interface MTU, set to 1280 if using IPv6 ``table`` string ``auto`` Controls the routing table to which routes are added ``pre_up`` string Script snippet which will be executed before diff --git a/netjsonconfig/backends/wireguard/schema.py b/netjsonconfig/backends/wireguard/schema.py index d2954d077..9242c59d5 100644 --- a/netjsonconfig/backends/wireguard/schema.py +++ b/netjsonconfig/backends/wireguard/schema.py @@ -59,7 +59,8 @@ "title": "MTU", "minimum": 68, "propertyOrder": 5, - "default": 1280, + "default": 1420, + "description": ("Interface MTU, set to 1280 if using IPv6."), }, "table": { "title": "Table", From 6f8d8bbe9b31b94b6c26fee655002103da8cd9bf Mon Sep 17 00:00:00 2001 From: Federico Capoano Date: Fri, 23 Aug 2024 10:44:56 -0400 Subject: [PATCH 3/3] [chores] Update netjsonconfig/backends/wireguard/schema.py --- netjsonconfig/backends/wireguard/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netjsonconfig/backends/wireguard/schema.py b/netjsonconfig/backends/wireguard/schema.py index 9242c59d5..f4ec07cad 100644 --- a/netjsonconfig/backends/wireguard/schema.py +++ b/netjsonconfig/backends/wireguard/schema.py @@ -60,7 +60,7 @@ "minimum": 68, "propertyOrder": 5, "default": 1420, - "description": ("Interface MTU, set to 1280 if using IPv6."), + "description": "Interface MTU, set to 1280 if using IPv6.", }, "table": { "title": "Table",