Skip to content

luci-proto-wireguard: download current peer configuration - #8966

Open
dhrm1k wants to merge 1 commit into
openwrt:masterfrom
dhrm1k:fix/wireguard-peer-config-download
Open

luci-proto-wireguard: download current peer configuration#8966
dhrm1k wants to merge 1 commit into
openwrt:masterfrom
dhrm1k:fix/wireguard-peer-config-download

Conversation

@dhrm1k

@dhrm1k dhrm1k commented Aug 23, 2026

Copy link
Copy Markdown

Pull request details

Description

The WireGuard export preview is regenerated whenever its fields change, but the download button keeps using the configuration created when the dialog was opened. This can leave changes such as added DNS servers out of the downloaded file.

Read the current preview when the download is requested so the file matches what LuCI displays.

Fixes openwrt/packages#30358

Screenshot or video of changes (if applicable)

Not applicable. This changes the downloaded configuration rather than the visible layout.

Maintainer (preferred)

@danrl


Tested on

OpenWrt version: OpenWrt 25.12.2 (r32802-f505120278)
LuCI version: LuCI openwrt-25.12 branch (26.082.75780~067535e)
Web browser(s): Firefox 151.0.2

Tested on an x86/64 OpenWrt VM. After adding 9.9.9.9 as a DNS server, the downloaded wireguard-peer.conf exactly matched the updated preview and contained:

DNS = 192.168.1.1, 9.9.9.9

node --check and git diff --check also pass.


Checklist

@openwrt openwrt Bot added the not following guidelines Pull request does not follow formatting guidelines label Aug 23, 2026
The export preview is regenerated whenever its fields change, but
the download button keeps using the configuration created when the dialog
was opened. This can leave changes such as added DNS servers out of the
downloaded file.

Read the current preview when the download is requested so the file matches
what LuCI displays.

Signed-off-by: Dharmik Parmar <dharmikparmar2004@yahoo.com>
@dhrm1k
dhrm1k force-pushed the fix/wireguard-peer-config-download branch from 00b9ac7 to 0363a9e Compare August 23, 2026 05:30
@openwrt openwrt Bot removed the not following guidelines Pull request does not follow formatting guidelines label Aug 23, 2026

@danrl danrl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; no new issues found.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

luci-app-wireguard: dns ignored in generated config

3 participants