local map, section, net = ...
local ifname = net:get_interface():name()
local private_key, listen_port
-local metric, mtu, preshared_key
+local metric, mtu, preshared_key, description
local peers, public_key, allowed_ips, endpoint, persistent_keepalive
translate("Optional. UDP port used for outgoing and incoming packets.")
)
listen_port.datatype = "port"
-listen_port.placeholder = "51820"
+listen_port.placeholder = translate("random")
listen_port.optional = true
addresses = section:taboption(
Value,
"metric",
translate("Metric"),
- translate("Optional.")
+ translate("Optional")
)
metric.datatype = "uinteger"
metric.placeholder = "0"
"wireguard_" .. ifname,
translate("Peers"),
translate("Further information about WireGuard interfaces and peers " ..
- "at <a href=\"http://wireguard.io\">wireguard.io</a>.")
+ "at <a href=\"http://wireguard.com\">wireguard.com</a>.")
)
peers.template = "cbi/tsection"
peers.anonymous = true
peers.addremove = true
+description = peers:option(
+ Value,
+ "description",
+ translate("Description"),
+ translate("Optional. Description of peer."))
+description.placeholder = "My Peer"
+description.datatype = "string"
+description.optional = true
+
+
public_key = peers:option(
Value,
"public_key",