From 18cedc1a5797ddbdde5fbfd483e10be26ce2131e Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 18 Mar 2026 23:51:09 +0100 Subject: [PATCH 1/2] WireGuard: add DynamicList for ip6prefix and pd_prefix --- .../htdocs/luci-static/resources/protocol/wireguard.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js index 29a9687fca35..37a121bcd196 100644 --- a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js +++ b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js @@ -157,6 +157,14 @@ return network.registerProtocol('wireguard', { o.datatype = 'ipaddr'; o.optional = true; + o = s.taboption('general', form.DynamicList, 'ip6prefix', _('IPv6 routed prefix'), _('This is the prefix routed to you by your provider for use by clients')); + o.datatype = 'cidr6'; + o.optional = true; + + o = s.taboption('general', form.DynamicList, 'pd_prefix', _('PD Prefix'), _('IPv6 prefix obtained via Prefix Delegation for use by clients')); + o.datatype = 'cidr6'; + o.optional = true; + o = s.taboption('general', form.Flag, 'nohostroute', _('No Host Routes'), _('Optional. Do not create host routes to peers.')); o.optional = true; From cc5f83b640b48b7fcc886f420ee59d1c85602fbe Mon Sep 17 00:00:00 2001 From: Maksym Vasylchenko Date: Thu, 2 Apr 2026 13:51:12 +0200 Subject: [PATCH 2/2] luci-proto-wireguard: add IPv6 routed prefix (ip6prefix) support Add support for IPv6 routed prefix (ip6prefix) in the General Settings tab of WireGuard interfaces, similar to other protocols like 6in4. This allows users to configure Prefix Delegation for WireGuard interfaces through LuCI, enabling proper IPv6 SLAAC delegation to downstream clients. Changes: - Add ip6prefix DynamicList option to general tab - Remove duplicate ip6prefix from advanced tab Signed-off-by: Maksym Vasylchenko --- .../htdocs/luci-static/resources/protocol/wireguard.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js index 37a121bcd196..4673386c32cc 100644 --- a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js +++ b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js @@ -157,11 +157,7 @@ return network.registerProtocol('wireguard', { o.datatype = 'ipaddr'; o.optional = true; - o = s.taboption('general', form.DynamicList, 'ip6prefix', _('IPv6 routed prefix'), _('This is the prefix routed to you by your provider for use by clients')); - o.datatype = 'cidr6'; - o.optional = true; - - o = s.taboption('general', form.DynamicList, 'pd_prefix', _('PD Prefix'), _('IPv6 prefix obtained via Prefix Delegation for use by clients')); + o = s.taboption('general', form.DynamicList, 'ip6prefix', _('IPv6 routed prefix'), _('IPv6 prefix routed to this interface for use by clients. Use this for Prefix Delegation.')); o.datatype = 'cidr6'; o.optional = true; @@ -190,9 +186,6 @@ return network.registerProtocol('wireguard', { return true; }; - o = s.taboption('advanced', form.DynamicList, 'ip6prefix', _('IPv6 routed prefix'), _('This is the prefix routed to you by your provider for use by clients')); - o.datatype = 'cidr6'; - // -- peers ----------------------------------------------------------------------- try {