mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-06-19 18:46:35 +00:00
TUN-9101: Don't ignore errors on cloudflared access ssh
## Summary This change ensures that errors resulting from the `cloudflared access ssh` call are no longer ignored. By returning the error from `carrier.StartClient` to the upstream, we ensure that these errors are properly logged on stdout, providing better visibility and debugging capabilities. Relates to TUN-9101
This commit is contained in:
parent
11777db304
commit
e7586153be
@ -104,7 +104,7 @@ func ssh(c *cli.Context) error {
|
|||||||
case 3:
|
case 3:
|
||||||
options.OriginURL = fmt.Sprintf("https://%s:%s", parts[2], parts[1])
|
options.OriginURL = fmt.Sprintf("https://%s:%s", parts[2], parts[1])
|
||||||
options.TLSClientConfig = &tls.Config{
|
options.TLSClientConfig = &tls.Config{
|
||||||
InsecureSkipVerify: true,
|
InsecureSkipVerify: true, // #nosec G402
|
||||||
ServerName: parts[0],
|
ServerName: parts[0],
|
||||||
}
|
}
|
||||||
log.Warn().Msgf("Using insecure SSL connection because SNI overridden to %s", parts[0])
|
log.Warn().Msgf("Using insecure SSL connection because SNI overridden to %s", parts[0])
|
||||||
@ -141,6 +141,5 @@ func ssh(c *cli.Context) error {
|
|||||||
logger := log.With().Str("host", url.Host).Logger()
|
logger := log.With().Str("host", url.Host).Logger()
|
||||||
s = stream.NewDebugStream(s, &logger, maxMessages)
|
s = stream.NewDebugStream(s, &logger, maxMessages)
|
||||||
}
|
}
|
||||||
carrier.StartClient(wsConn, s, options)
|
return carrier.StartClient(wsConn, s, options)
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user