[client] fix privacy warning on macOS (#3350)

* fix: macos privacy warning

Move GetDesktopUIUserAgent to its own package so UI does not have to
import client/system package that reaches out to broadcasts address.
Thus, fixing the network privacy warnings.
This commit is contained in:
Carlos Hernandez
2025-02-22 04:41:24 -07:00
committed by GitHub
parent b64bee35fa
commit 559e673107
4 changed files with 13 additions and 10 deletions

View File

@@ -15,7 +15,7 @@ import (
"google.golang.org/grpc/credentials/insecure"
"github.com/netbirdio/netbird/client/proto"
"github.com/netbirdio/netbird/client/system"
"github.com/netbirdio/netbird/client/ui/desktop"
)
type Handler func(*proto.SystemEvent)
@@ -167,7 +167,7 @@ func getClient(addr string) (proto.DaemonServiceClient, error) {
conn, err := grpc.NewClient(
strings.TrimPrefix(addr, "tcp://"),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithUserAgent(system.GetDesktopUIUserAgent()),
grpc.WithUserAgent(desktop.GetUIUserAgent()),
)
if err != nil {
return nil, err