Add DoNotCreateNewClient

Former-commit-id: aedebb5579
This commit is contained in:
Owen
2025-11-07 15:26:45 -08:00
parent 235877c379
commit 7696ba2e36
3 changed files with 55 additions and 35 deletions

View File

@@ -50,8 +50,9 @@ type Config struct {
// Source tracking (not in JSON)
sources map[string]string
Version string
OrgID string
Version string
OrgID string
DoNotCreateNewClient bool
}
var (
@@ -709,10 +710,11 @@ func TunnelProcess(ctx context.Context, config Config, id string, secret string,
if stopRegister == nil {
logger.Debug("Sending registration message to server with public key: %s and relay: %v", publicKey, !config.Holepunch)
stopRegister = olm.SendMessageInterval("olm/wg/register", map[string]interface{}{
"publicKey": publicKey.String(),
"relay": !config.Holepunch,
"olmVersion": config.Version,
"orgId": config.OrgID,
"publicKey": publicKey.String(),
"relay": !config.Holepunch,
"olmVersion": config.Version,
"orgId": config.OrgID,
"doNotCreateNewClient": config.DoNotCreateNewClient,
}, 1*time.Second)
}