summaryrefslogtreecommitdiffhomepage
path: root/protocols
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2017-05-17 22:36:31 +0300
committerGitHub <noreply@github.com>2017-05-17 22:36:31 +0300
commit7deb3abbadd672338dc8376fc8f5cc7092cdb19d (patch)
treec920bbe9cebc0944dd2051b9687b857ee7809bf2 /protocols
parent41d604f23cbc92add976b8ab8c9d65cf08a81a87 (diff)
parentb9b64aae968f2d9fbb361ef96ee7e3a58437314f (diff)
Merge pull request #1160 from zx2c4/wg-psk-change
wireguard: preshared-key is now an attribute of the peer
Diffstat (limited to 'protocols')
-rw-r--r--protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua28
1 files changed, 13 insertions, 15 deletions
diff --git a/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua b/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua
index 11ef10b5a7..bb7674b315 100644
--- a/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua
+++ b/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua
@@ -70,21 +70,6 @@ mtu.datatype = "range(1280,1420)"
mtu.placeholder = "1420"
mtu.optional = true
-
-preshared_key = section:taboption(
- "advanced",
- Value,
- "preshared_key",
- translate("Preshared Key"),
- translate("Optional. Base64-encoded preshared key. " ..
- "Adds in an additional layer of symmetric-key " ..
- "cryptography for post-quantum resistance.")
-)
-preshared_key.password = true
-preshared_key.datatype = "and(base64,rangelength(44,44))"
-preshared_key.optional = true
-
-
fwmark = section:taboption(
"advanced",
Value,
@@ -121,6 +106,19 @@ public_key.datatype = "and(base64,rangelength(44,44))"
public_key.optional = false
+preshared_key = peers:option(
+ Value,
+ "preshared_key",
+ translate("Preshared Key"),
+ translate("Optional. Base64-encoded preshared key. " ..
+ "Adds in an additional layer of symmetric-key " ..
+ "cryptography for post-quantum resistance.")
+)
+preshared_key.password = true
+preshared_key.datatype = "and(base64,rangelength(44,44))"
+preshared_key.optional = true
+
+
allowed_ips = peers:option(
DynamicList,
"allowed_ips",