TUN-5833: Send feature `allow_remote_config` if Tunnel is run with --token

This commit is contained in:
Nuno Diegues 2022-03-16 11:27:35 +00:00
parent ca43b0357f
commit 057a0cc758
2 changed files with 4 additions and 1 deletions

View File

@ -191,6 +191,10 @@ func prepareTunnelConfig(
} }
log.Info().Msgf("Generated Connector ID: %s", clientUUID) log.Info().Msgf("Generated Connector ID: %s", clientUUID)
features := append(c.StringSlice("features"), supervisor.FeatureSerializedHeaders) 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{ namedTunnel.Client = tunnelpogs.ClientInfo{
ClientID: clientUUID[:], ClientID: clientUUID[:],
Features: dedup(features), Features: dedup(features),

View File

@ -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.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("\nCreated tunnel %s with id %s\n", tunnel.Name, tunnel.ID)
fmt.Printf("\nTunnel Token: %s\n", tunnel.Token)
return &tunnel.Tunnel, nil return &tunnel.Tunnel, nil
} }