summaryrefslogtreecommitdiffhomepage
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/luci-proto-wireguard/Makefile1
-rw-r--r--protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua25
2 files changed, 20 insertions, 6 deletions
diff --git a/protocols/luci-proto-wireguard/Makefile b/protocols/luci-proto-wireguard/Makefile
index ed94a557b6..0dc70cf31e 100644
--- a/protocols/luci-proto-wireguard/Makefile
+++ b/protocols/luci-proto-wireguard/Makefile
@@ -8,6 +8,7 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=Support for WireGuard VPN
LUCI_DEPENDS:=+kmod-wireguard +wireguard-tools
+LUCI_PKGARCH:=all
PKG_MAINTAINER:=Dan Luedtke <mail@danrl.com>
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 de4ece3471..11ef10b5a7 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
@@ -19,7 +19,7 @@ private_key = section:taboption(
translate("Required. Base64-encoded private key for this interface.")
)
private_key.password = true
-private_key.datatype = "rangelength(44, 44)"
+private_key.datatype = "and(base64,rangelength(44,44))"
private_key.optional = false
@@ -76,14 +76,27 @@ preshared_key = section:taboption(
Value,
"preshared_key",
translate("Preshared Key"),
- translate("Optional. Adds in an additional layer of symmetric-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 = "rangelength(44, 44)"
+preshared_key.datatype = "and(base64,rangelength(44,44))"
preshared_key.optional = true
+fwmark = section:taboption(
+ "advanced",
+ Value,
+ "fwmark",
+ translate("Firewall Mark"),
+ translate("Optional. 32-bit mark for outgoing encrypted packets. " ..
+ "Enter value in hex, starting with <code>0x</code>.")
+)
+fwmark.datatype = "hex(4)"
+fwmark.optional = true
+
+
-- peers -----------------------------------------------------------------------
peers = map:section(
@@ -102,9 +115,9 @@ public_key = peers:option(
Value,
"public_key",
translate("Public Key"),
- translate("Required. Public key of peer.")
+ translate("Required. Base64-encoded public key of peer.")
)
-public_key.datatype = "rangelength(44, 44)"
+public_key.datatype = "and(base64,rangelength(44,44))"
public_key.optional = false
@@ -154,5 +167,5 @@ persistent_keepalive = peers:option(
translate("Optional. Seconds between keep alive messages. " ..
"Default is 0 (disabled). Recommended value if " ..
"this device is behind a NAT is 25."))
-persistent_keepalive.datatype = "range(0, 65535)"
+persistent_keepalive.datatype = "range(0,65535)"
persistent_keepalive.placeholder = "0"