From f070c8a122d6a8cde48938beca9e9cf91a2523fc Mon Sep 17 00:00:00 2001 From: h0x0er Date: Wed, 5 Jun 2024 11:32:02 +0530 Subject: [PATCH] otk: passing one-time-key in apiClient Signed-off-by: h0x0er --- agent.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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")