diff --git a/internal/login/login.go b/internal/login/login.go index 98bef822..d907aed6 100644 --- a/internal/login/login.go +++ b/internal/login/login.go @@ -63,11 +63,7 @@ func Login(name string, token string, endpoint string, components string, uid st return nil } -func Gossip(name string, endpoint string, uid string, address string) error { - ip, err := PublicIP() - if err != nil { - return fmt.Errorf("failed to fetch public ip: %w", err) - } +func Gossip(endpoint string, uid string, address string) error { type payload struct { Name string `json:"name"` ID string `json:"id"` @@ -80,9 +76,8 @@ func Gossip(name string, endpoint string, uid string, address string) error { Status string `json:"status"` } content := payload{ - Name: name, + Name: uid, ID: uid, - PublicIP: ip, Provider: "personal", DaemonVersion: version.Version, } diff --git a/internal/server/server.go b/internal/server/server.go index 4941e88b..26c968ab 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -851,11 +851,7 @@ func New(ctx context.Context, config *lepconfig.Config, endpoint string) (_ *Ser } }() - hostname, err := goOS.Hostname() - if err != nil { - hostname = "UnknownName" - } - if err = login.Gossip(hostname, endpoint, uid, config.Address); err != nil { + if err = login.Gossip(endpoint, uid, config.Address); err != nil { log.Logger.Errorf("failed to gossip: %v", err) } return s, nil