Skip to content

Commit

Permalink
otk: passing one-time-key in apiClient
Browse files Browse the repository at this point in the history
Signed-off-by: h0x0er <[email protected]>
  • Loading branch information
h0x0er committed Jun 5, 2024
1 parent ff3fe33 commit f070c8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f070c8a

Please sign in to comment.