add optional config setting to use nats standard tcp instead of websockets

This commit is contained in:
wh1te909 2022-07-01 19:12:34 +00:00
parent 38907f6bc2
commit 92dd7c110f
4 changed files with 44 additions and 34 deletions

View file

@ -63,19 +63,21 @@ func NewAgentConfig() *rmm.AgentConfig {
customMeshDir, _, _ := k.GetStringValue("MeshDir")
natsProxyPath, _, _ := k.GetStringValue("NatsProxyPath")
natsProxyPort, _, _ := k.GetStringValue("NatsProxyPort")
natsStandardPort, _, _ := k.GetStringValue("NatsStandardPort")
return &rmm.AgentConfig{
BaseURL: baseurl,
AgentID: agentid,
APIURL: apiurl,
Token: token,
AgentPK: agentpk,
PK: pk,
Cert: cert,
Proxy: proxy,
CustomMeshDir: customMeshDir,
NatsProxyPath: natsProxyPath,
NatsProxyPort: natsProxyPort,
BaseURL: baseurl,
AgentID: agentid,
APIURL: apiurl,
Token: token,
AgentPK: agentpk,
PK: pk,
Cert: cert,
Proxy: proxy,
CustomMeshDir: customMeshDir,
NatsProxyPath: natsProxyPath,
NatsProxyPort: natsProxyPort,
NatsStandardPort: natsStandardPort,
}
}