[client] Debug information for connection (#4439)

Improve logging

Print the exact time when the first WireGuard handshake occurs
Print the steps for gathering system information
This commit is contained in:
Zoltan Papp
2025-09-08 14:51:34 +02:00
committed by GitHub
parent 5113c70943
commit 69d87343d2
5 changed files with 22 additions and 6 deletions

View File

@@ -394,6 +394,13 @@ func toLastHandshake(stringVar string) (time.Time, error) {
if err != nil {
return time.Time{}, fmt.Errorf("parse handshake sec: %w", err)
}
// If sec is 0 (Unix epoch), return zero time instead
// This indicates no handshake has occurred
if sec == 0 {
return time.Time{}, nil
}
return time.Unix(sec, 0), nil
}