Skip to content

Commit e758615

Browse files
committed
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
1 parent 11777db commit e758615

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cmd/cloudflared/access/carrier.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func ssh(c *cli.Context) error {
104104
case 3:
105105
options.OriginURL = fmt.Sprintf("https://%s:%s", parts[2], parts[1])
106106
options.TLSClientConfig = &tls.Config{
107-
InsecureSkipVerify: true,
107+
InsecureSkipVerify: true, // #nosec G402
108108
ServerName: parts[0],
109109
}
110110
log.Warn().Msgf("Using insecure SSL connection because SNI overridden to %s", parts[0])
@@ -141,6 +141,5 @@ func ssh(c *cli.Context) error {
141141
logger := log.With().Str("host", url.Host).Logger()
142142
s = stream.NewDebugStream(s, &logger, maxMessages)
143143
}
144-
carrier.StartClient(wsConn, s, options)
145-
return nil
144+
return carrier.StartClient(wsConn, s, options)
146145
}

0 commit comments

Comments
 (0)