From 34560470cefdced544b1b1e0d1df635704606056 Mon Sep 17 00:00:00 2001 From: Pasha Sviderski Date: Mon, 4 May 2026 16:01:55 +1000 Subject: [PATCH] docs: make it clear --wg-endpoint doesn't change addr/port WG listens on --- cmd/uncloud/machine/add.go | 9 +++++---- cmd/uncloud/machine/init.go | 9 +++++---- cmd/uncloud/machine/update.go | 7 ++++--- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/cmd/uncloud/machine/add.go b/cmd/uncloud/machine/add.go index 64081010..74915b94 100644 --- a/cmd/uncloud/machine/add.go +++ b/cmd/uncloud/machine/add.go @@ -96,11 +96,12 @@ Connection methods: ) cmd.Flags().StringSliceVar( &opts.wgEndpoints, "wg-endpoint", nil, - fmt.Sprintf("WireGuard endpoint address in format: IP, IP:PORT, IPv6, or [IPv6]:PORT. "+ - "Default port %d is used if omitted.\n", network.WireGuardPort)+ - "Other machines in the cluster will use this endpoint to establish a WireGuard connection to this machine.\n"+ + fmt.Sprintf("WireGuard endpoint address that other machines in the cluster should use to establish "+ + "WireGuard connections\n"+ + "to this machine. This doesn't change the address/port WireGuard listens on the machine.\n"+ + "Format: IP, IP:PORT, IPv6, or [IPv6]:PORT. Default port is %d if omitted.\n", network.WireGuardPort)+ "Multiple endpoints can be specified by repeating the flag or using a comma-separated list.\n"+ - "If not specified, the machine's routable IPs and public IP are auto-detected and used as endpoints.", + "Defaults to the auto-detected public and routable machine IPs.", ) cmd.Flags().BoolVarP(&opts.yes, "yes", "y", false, "Auto-confirm prompts (e.g., resetting an already initialised machine).\n"+ diff --git a/cmd/uncloud/machine/init.go b/cmd/uncloud/machine/init.go index 3e09a1ac..92bb6318 100644 --- a/cmd/uncloud/machine/init.go +++ b/cmd/uncloud/machine/init.go @@ -135,11 +135,12 @@ Connection methods: ) cmd.Flags().StringSliceVar( &opts.wgEndpoints, "wg-endpoint", nil, - fmt.Sprintf("WireGuard endpoint address in format: IP, IP:PORT, IPv6, or [IPv6]:PORT. "+ - "Default port %d is used if omitted.\n", network.WireGuardPort)+ - "Other machines in the cluster will use this endpoint to establish a WireGuard connection to this machine.\n"+ + fmt.Sprintf("WireGuard endpoint address that other machines in the cluster should use to establish "+ + "WireGuard connections\n"+ + "to this machine. This doesn't change the address/port WireGuard listens on the machine.\n"+ + "Format: IP, IP:PORT, IPv6, or [IPv6]:PORT. Default port is %d if omitted.\n", network.WireGuardPort)+ "Multiple endpoints can be specified by repeating the flag or using a comma-separated list.\n"+ - "If not specified, the machine's routable IPs and public IP are auto-detected and used as endpoints.", + "Defaults to the auto-detected public and routable machine IPs.", ) cmd.Flags().BoolVarP(&opts.yes, "yes", "y", false, "Auto-confirm prompts (e.g., resetting an already initialised machine).\n"+ diff --git a/cmd/uncloud/machine/update.go b/cmd/uncloud/machine/update.go index 7fa013b4..d033352c 100644 --- a/cmd/uncloud/machine/update.go +++ b/cmd/uncloud/machine/update.go @@ -67,9 +67,10 @@ At least one flag must be specified to perform an update.`, ) cmd.Flags().StringSliceVar( &opts.wgEndpoints, "wg-endpoint", nil, - fmt.Sprintf("WireGuard endpoint address in format: IP, IP:PORT, IPv6, or [IPv6]:PORT. "+ - "Default port %d is used if omitted.\n", network.WireGuardPort)+ - "Other machines in the cluster will use this endpoint to establish a WireGuard connection to this machine.\n"+ + fmt.Sprintf("WireGuard endpoint address that other machines in the cluster should use to establish "+ + "WireGuard connections\n"+ + "to this machine. This doesn't change the address/port WireGuard listens on the machine.\n"+ + "Format: IP, IP:PORT, IPv6, or [IPv6]:PORT. Default port is %d if omitted.\n", network.WireGuardPort)+ "Multiple endpoints can be specified by repeating the flag or using a comma-separated list.", )