From 491a017189620a295a89fd66649a8728ed7f8e22 Mon Sep 17 00:00:00 2001 From: viruslox <12681439+viruslox@users.noreply.github.com> Date: Thu, 20 Aug 2026 22:10:23 +0000 Subject: [PATCH] Fix silent setup failure by handling errors in server component setup Adds error handling to `setupServerComponents()` invocation within the interactive menu and propagates errors from `network.SetupMptcpProxy()` and `network.SetupMlvpnBonding()`. Also adds user-facing error messages detailing setup failures. --- cmd/server/cmd/interactive.go | 4 +++- cmd/server/cmd/setup.go | 11 +++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cmd/server/cmd/interactive.go b/cmd/server/cmd/interactive.go index b305101..952f370 100644 --- a/cmd/server/cmd/interactive.go +++ b/cmd/server/cmd/interactive.go @@ -22,7 +22,9 @@ func runInteractiveMenu() { switch opt { case "1": - setupServerComponents() + if err := setupServerComponents(); err != nil { + sysutils.Error("Server setup did not complete: %v", err) + } case "2": sysutils.RunRollback() case "3": diff --git a/cmd/server/cmd/setup.go b/cmd/server/cmd/setup.go index 88c49b1..30ee0bf 100644 --- a/cmd/server/cmd/setup.go +++ b/cmd/server/cmd/setup.go @@ -11,8 +11,15 @@ import ( func setupServerComponents() error { sysutils.InstallShadowsocks() sysutils.InstallMlvpn() - network.SetupMptcpProxy() - network.SetupMlvpnBonding() + if err := network.SetupMptcpProxy(); err != nil { + sysutils.Error("MPTCP proxy setup failed: %v", err) + } + if err := network.SetupMlvpnBonding(); err != nil { + sysutils.Error("MLVPN bonding setup failed: %v", err) + sysutils.Error("No MLVPN tunnel services were created. Fix the issue above and re-run setup. "+ + "Peer names in %s must be lowercase, DNS-label safe (letters, digits, internal hyphens).", network.ServerPeersPath()) + return err + } sysutils.Info("The following ports are required for the server components:") sysutils.Info("- 8889/tcp (mediamtx WEBRTC)")