From 138e728427c100fbfba71d1a4bb840b2142ec330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Thu, 29 Jan 2026 11:43:31 +0100 Subject: [PATCH] Invoke callback on handshake success in WireGuard watcher --- client/internal/peer/wg_watcher.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/internal/peer/wg_watcher.go b/client/internal/peer/wg_watcher.go index e83875208..f966107c0 100644 --- a/client/internal/peer/wg_watcher.go +++ b/client/internal/peer/wg_watcher.go @@ -95,6 +95,9 @@ func (w *WGWatcher) periodicHandshakeCheck(ctx context.Context, onDisconnectedFn if lastHandshake.IsZero() { elapsed := calcElapsed(enabledTime, *handshake) w.log.Infof("first wg handshake detected within: %.2fsec, (%s)", elapsed, handshake) + if onHandshakeSuccessFn != nil { + onHandshakeSuccessFn(*handshake) + } } lastHandshake = *handshake