projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
luci-proto-wireguard: fix wrong maximum MTU
[project/luci.git]
/
protocols
/
luci-proto-wireguard
/
luasrc
/
model
/
cbi
/
admin_network
/
proto_wireguard.lua
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
e088881
..
de4ece3
100644
(file)
--- 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
@@
-1,4
+1,4
@@
--- Copyright 2016 Dan Luedtke <mail@danrl.com>
+-- Copyright 2016
-2017
Dan Luedtke <mail@danrl.com>
-- Licensed to the public under the Apache License 2.0.
-- Licensed to the public under the Apache License 2.0.
@@
-19,7
+19,7
@@
private_key = section:taboption(
translate("Required. Base64-encoded private key for this interface.")
)
private_key.password = true
translate("Required. Base64-encoded private key for this interface.")
)
private_key.password = true
-private_key.datatype = "
and(minlength(44),maxlength(44)
)"
+private_key.datatype = "
rangelength(44, 44
)"
private_key.optional = false
private_key.optional = false
@@
-34,6
+34,16
@@
listen_port.datatype = "port"
listen_port.placeholder = "51820"
listen_port.optional = true
listen_port.placeholder = "51820"
listen_port.optional = true
+addresses = section:taboption(
+ "general",
+ DynamicList,
+ "addresses",
+ translate("IP Addresses"),
+ translate("Recommended. IP addresses of the WireGuard interface.")
+)
+addresses.datatype = "ipaddr"
+addresses.optional = true
+
-- advanced --------------------------------------------------------------------
-- advanced --------------------------------------------------------------------
@@
-56,8
+66,8
@@
mtu = section:taboption(
translate("MTU"),
translate("Optional. Maximum Transmission Unit of tunnel interface.")
)
translate("MTU"),
translate("Optional. Maximum Transmission Unit of tunnel interface.")
)
-mtu.datatype = "range(1280,142
3
)"
-mtu.placeholder = "142
3
"
+mtu.datatype = "range(1280,142
0
)"
+mtu.placeholder = "142
0
"
mtu.optional = true
mtu.optional = true
@@
-70,7
+80,7
@@
preshared_key = section:taboption(
"cryptography for post-quantum resistance.")
)
preshared_key.password = true
"cryptography for post-quantum resistance.")
)
preshared_key.password = true
-preshared_key.datatype = "
and(minlength(44),maxlength(44)
)"
+preshared_key.datatype = "
rangelength(44, 44
)"
preshared_key.optional = true
preshared_key.optional = true
@@
-94,7
+104,7
@@
public_key = peers:option(
translate("Public Key"),
translate("Required. Public key of peer.")
)
translate("Public Key"),
translate("Required. Public key of peer.")
)
-public_key.datatype = "
and(minlength(44),maxlength(44)
)"
+public_key.datatype = "
rangelength(44, 44
)"
public_key.optional = false
public_key.optional = false
@@
-103,9
+113,10
@@
allowed_ips = peers:option(
"allowed_ips",
translate("Allowed IPs"),
translate("Required. IP addresses and prefixes that this peer is allowed " ..
"allowed_ips",
translate("Allowed IPs"),
translate("Required. IP addresses and prefixes that this peer is allowed " ..
- "to use inside the tunnel. Routes will be added accordingly.")
+ "to use inside the tunnel. Usually the peer's tunnel IP " ..
+ "addresses and the networks the peer routes through the tunnel.")
)
)
-allowed_ips.datatype = "
or(ip6addr, ip4addr)
"
+allowed_ips.datatype = "
ipaddr
"
allowed_ips.optional = false
allowed_ips.optional = false