diff --git a/internal/cmd/base/listener.go b/internal/cmd/base/listener.go index ef4d82eb57..df148b6f15 100644 --- a/internal/cmd/base/listener.go +++ b/internal/cmd/base/listener.go @@ -36,6 +36,7 @@ type WorkerAuthInfo struct { Name string `json:"name"` Description string `json:"description"` ConnectionNonce string `json:"connection_nonce"` + ProxyAddress string `json:"proxy_address"` } // Factory is the factory function to create a listener. diff --git a/internal/daemon/controller/intercepting_listener.go b/internal/daemon/controller/intercepting_listener.go index 6a95f18ae3..b427fdd4d3 100644 --- a/internal/daemon/controller/intercepting_listener.go +++ b/internal/daemon/controller/intercepting_listener.go @@ -113,7 +113,7 @@ func (m *interceptingListener) Accept() (net.Conn, error) { } workerInfo := workerInfoRaw.(*workerAuthEntry) workerInfo.conn = tlsConn - event.WriteSysEvent(ctx, op, "worker successfully authed", "name", workerInfo.Name) + event.WriteSysEvent(ctx, op, "worker successfully authed", "name", workerInfo.Name, "description", workerInfo.Description, "proxy_address", workerInfo.ProxyAddress) return tlsConn, nil default: diff --git a/internal/daemon/worker/controller_connection.go b/internal/daemon/worker/controller_connection.go index a7d77bbf9c..9f51475d44 100644 --- a/internal/daemon/worker/controller_connection.go +++ b/internal/daemon/worker/controller_connection.go @@ -208,8 +208,9 @@ func (w *Worker) createClientConn(addr string) error { func (w *Worker) workerAuthTLSConfig() (*tls.Config, *base.WorkerAuthInfo, error) { var err error info := &base.WorkerAuthInfo{ - Name: w.conf.RawConfig.Worker.Name, - Description: w.conf.RawConfig.Worker.Description, + Name: w.conf.RawConfig.Worker.Name, + Description: w.conf.RawConfig.Worker.Description, + ProxyAddress: w.conf.RawConfig.Worker.PublicAddr, } info.ConnectionNonce, err = w.nonceFn(20)