1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-08 03:55:11 +08:00

TUN-3855: Add ability to override target of 'access ssh' command to a different host for testing

This commit is contained in:
Igor Postelnik
2021-02-03 13:00:55 -06:00
committed by Nuno Diegues
parent 8b794390e5
commit 9c298e4851
4 changed files with 41 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ const (
sshTokenIDFlag = "service-token-id"
sshTokenSecretFlag = "service-token-secret"
sshGenCertFlag = "short-lived-cert"
sshConnectTo = "connect-to"
sshConfigTemplate = `
Add to your {{.Home}}/.ssh/config:
@@ -54,7 +55,7 @@ Host cfpipe-{{.Hostname}}
const sentryDSN = "https://56a9c9fa5c364ab28f34b14f35ea0f1b@sentry.io/189878"
var (
shutdownC chan struct{}
shutdownC chan struct{}
)
// Init will initialize and store vars from the main program
@@ -164,6 +165,11 @@ func Commands() []*cli.Command {
Aliases: []string{"loglevel"}, //added to match the tunnel side
Usage: "Application logging level {fatal, error, info, debug}. ",
},
&cli.StringFlag{
Name: sshConnectTo,
Hidden: true,
Usage: "Connect to alternate location for testing, value is host, host:port, or sni:port:host",
},
},
},
{