From c45762f0c5aac2a0b6fb8b323039f319382b3758 Mon Sep 17 00:00:00 2001 From: nallux-dozryl Date: Sat, 9 Mar 2024 04:37:19 +0800 Subject: [PATCH] fix startram key not reseting before registration in setup --- goseg/setup/setup.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/goseg/setup/setup.go b/goseg/setup/setup.go index e43fe176..a675a9d8 100644 --- a/goseg/setup/setup.go +++ b/goseg/setup/setup.go @@ -53,6 +53,9 @@ func Setup(msg []byte, conn *structs.MuConn, token map[string]string) error { return fmt.Errorf("Unable to set password: %v", err) } case "startram": + if err := config.CycleWgKey(); err != nil { + return fmt.Errorf("Failed to reset registration key: %v", err) + } key := setupPayload.Payload.Key region := setupPayload.Payload.Region if err = startram.Register(key, region); err != nil {