Skip to content

Commit 99b6e99

Browse files
committed
docs: document --show-keys in man page; update bash completion
Signed-off-by: SupananWC <[email protected]>
1 parent 90e5357 commit 99b6e99

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/completion/wg.bash-completion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ _wg_completion() {
2222
fi
2323

2424
if [[ $COMP_CWORD -eq 3 && ${COMP_WORDS[1]} == show && ${COMP_WORDS[2]} != interfaces ]]; then
25-
COMPREPLY+=( $(compgen -W "public-key private-key listen-port peers preshared-keys endpoints allowed-ips fwmark latest-handshakes persistent-keepalive transfer dump" -- "${COMP_WORDS[3]}") )
25+
COMPREPLY+=( $(compgen -W "--show-keys public-key private-key listen-port peers preshared-keys endpoints allowed-ips fwmark latest-handshakes persistent-keepalive transfer dump" -- "${COMP_WORDS[3]}") )
2626
return
2727
fi
2828

src/man/wg.8

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ fwmark. Subsequent lines are printed for each peer and contain in order separate
5151
by tab: public-key, preshared-key, endpoint, allowed-ips, latest-handshake,
5252
transfer-rx, transfer-tx, persistent-keepalive.
5353
.TP
54+
\fBshow\fP [\fI--show-keys\fP] { \fI<interface>\fP | \fIall\fP | \fIinterfaces\fP } [\fIpublic-key\fP | \fIprivate-key\fP | \fIlisten-port\fP | \fIfwmark\fP | \fIpeers\fP | \fIpreshared-keys\fP | \fIendpoints\fP | \fIallowed-ips\fP | \fIlatest-handshakes\fP | \fIpersistent-keepalive\fP | \fItransfer\fP | \fIdump\fP]
55+
.PP
56+
If the special option \fI--show-keys\fP is provided before the interface
57+
argument, the pretty-printing output will reveal private and preshared keys
58+
for debugging (this respects the `WG_HIDE_KEYS=never` override). Use with care
59+
as keys are sensitive.
60+
.TP
5461
\fBshowconf\fP \fI<interface>\fP
5562
Shows the current configuration of \fI<interface>\fP in the format described
5663
by \fICONFIGURATION FILE FORMAT\fP below.

0 commit comments

Comments
 (0)