network: add auto-detection of optimal MTU for WireGuard interface, --wg-mtu flag, set max_mtu for Corrosion to 1232

This commit is contained in:
Pasha Sviderski
2026-06-16 21:36:12 +10:00
parent 2f76187bf5
commit 0c3b8b122f
18 changed files with 373 additions and 170 deletions
@@ -29,6 +29,7 @@ uc machine add [USER@]HOST[:PORT] [flags]
Format: IP, IP:PORT, IPv6, or [IPv6]:PORT. Default port is the value of --wg-port if omitted.
Multiple endpoints can be specified by repeating the flag or using a comma-separated list.
Defaults to the auto-detected public and routable machine IPs.
--wg-mtu int MTU of the WireGuard network interface on the machine. (default auto-detects the optimal value)
--wg-port int UDP port WireGuard listens on for incoming connections from other machines. (default 51820)
-y, --yes Auto-confirm prompts (e.g., resetting an already initialised machine).
Should be explicitly set when running non-interactively, e.g., in CI/CD pipelines. [$UNCLOUD_AUTO_CONFIRM]
@@ -51,6 +51,7 @@ uc machine init [schema://]USER@HOST[:PORT] [flags]
Format: IP, IP:PORT, IPv6, or [IPv6]:PORT. Default port is the value of --wg-port if omitted.
Multiple endpoints can be specified by repeating the flag or using a comma-separated list.
Defaults to the auto-detected public and routable machine IPs.
--wg-mtu int MTU of the WireGuard network interface on the machine. (default auto-detects the optimal value)
--wg-port int UDP port WireGuard listens on for incoming connections from other machines. (default 51820)
-y, --yes Auto-confirm prompts (e.g., resetting an already initialised machine).
Should be explicitly set when running non-interactively, e.g., in CI/CD pipelines. [$UNCLOUD_AUTO_CONFIRM]