diff --git a/agent.go b/agent.go index 80b5cd1..e182fa4 100644 --- a/agent.go +++ b/agent.go @@ -65,8 +65,9 @@ func Run(ctx context.Context, configFilePath string, hostDNSServer DNSServer, return err } - apiclient := &ApiClient{Client: &http.Client{Timeout: 3 * time.Second}, APIURL: config.APIURL, DisableTelemetry: config.DisableTelemetry, EgressPolicy: config.EgressPolicy} + apiclient := &ApiClient{Client: &http.Client{Timeout: 3 * time.Second}, APIURL: config.APIURL, DisableTelemetry: config.DisableTelemetry, EgressPolicy: config.EgressPolicy, OneTimeKey: config.OneTimeKey} + config.OneTimeKey = "" // TODO: pass in an iowriter/ use log library WriteLog(fmt.Sprintf("read config \n %+v", config)) WriteLog("\n")