diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-09 16:45:42 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-09 16:51:40 +0200 |
commit | b9b64aae968f2d9fbb361ef96ee7e3a58437314f (patch) | |
tree | e20482b98bccd3bfd2b46bc2f69f306ab9e2962a /protocols/luci-proto-wireguard/luasrc/model | |
parent | 757cdbb5f76cf1b57ecb63d316a1aab35423cb7e (diff) |
wireguard: preshared-key is now an attribute of the peer
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'protocols/luci-proto-wireguard/luasrc/model')
-rw-r--r-- | protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua | 28 |
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", |