From 057a0cc7580b407d376ca9c69703f0c20741e067 Mon Sep 17 00:00:00 2001 From: Nuno Diegues Date: Wed, 16 Mar 2022 11:27:35 +0000 Subject: [PATCH] TUN-5833: Send feature `allow_remote_config` if Tunnel is run with --token --- cmd/cloudflared/tunnel/configuration.go | 4 ++++ cmd/cloudflared/tunnel/subcommand_context.go | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/cloudflared/tunnel/configuration.go b/cmd/cloudflared/tunnel/configuration.go index 27ce90e0..d7d6da8d 100644 --- a/cmd/cloudflared/tunnel/configuration.go +++ b/cmd/cloudflared/tunnel/configuration.go @@ -191,6 +191,10 @@ func prepareTunnelConfig( } log.Info().Msgf("Generated Connector ID: %s", clientUUID) features := append(c.StringSlice("features"), supervisor.FeatureSerializedHeaders) + if c.IsSet(TunnelTokenFlag) { + features = append(features, supervisor.FeatureAllowRemoteConfig) + log.Info().Msg("Will be fetching remotely managed configuration from Cloudflare API") + } namedTunnel.Client = tunnelpogs.ClientInfo{ ClientID: clientUUID[:], Features: dedup(features), diff --git a/cmd/cloudflared/tunnel/subcommand_context.go b/cmd/cloudflared/tunnel/subcommand_context.go index 53609c3a..8490aa0c 100644 --- a/cmd/cloudflared/tunnel/subcommand_context.go +++ b/cmd/cloudflared/tunnel/subcommand_context.go @@ -220,7 +220,6 @@ func (sc *subcommandContext) create(name string, credentialsFilePath string, sec } fmt.Println(" Keep this file secret. To revoke these credentials, delete the tunnel.") fmt.Printf("\nCreated tunnel %s with id %s\n", tunnel.Name, tunnel.ID) - fmt.Printf("\nTunnel Token: %s\n", tunnel.Token) return &tunnel.Tunnel, nil }