Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
r0mant committed Apr 5, 2022
1 parent aa70caa commit fc1be78
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/srv/db/mysql/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (p *Proxy) performHandshake(conn *multiplexer.Conn, server *server.Conn) (*
case *multiplexer.Conn:
tlsConn, ok := c.Conn.(*tls.Conn)
if !ok {
return nil, trace.BadParameter("expected TLS connection, got: %T", c)
return nil, trace.BadParameter("expected TLS connection, got: %T", c.Conn)
}
return tlsConn, nil
}
Expand Down
2 changes: 1 addition & 1 deletion lib/srv/db/proxyserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ func (s *ProxyServer) MySQLProxy() *mysql.Proxy {
}
}

// MySQLProxy returns a new instance of the non-TLS MySQL proxy.
// MySQLProxyNoTLS returns a new instance of the non-TLS MySQL proxy.
func (s *ProxyServer) MySQLProxyNoTLS() *mysql.Proxy {
return &mysql.Proxy{
Middleware: s.middleware,
Expand Down
6 changes: 1 addition & 5 deletions tool/tsh/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ func onProxyCommandDB(cf *CLIConf) error {
"database": database.ServiceName,
"command": cmd.String(),
"address": listener.Addr().String(),
"cert": certFile,
"key": keyFile,
})
if err != nil {
return trace.Wrap(err)
Expand Down Expand Up @@ -388,9 +386,7 @@ Use following credentials to connect to the {{.database}} proxy:

// dbProxyAuthTpl is the message that's printed for an authenticated db proxy.
var dbProxyAuthTpl = template.Must(template.New("").Parse(
`Started authenticated local proxy for the database "{{.database}}" on {{.address}} with the following credentials:
cert_file={{.cert}}
key_file={{.key}}
`Started authenticated local proxy for the database "{{.database}}" on {{.address}}.
Use the following command to connect to the database:
$ {{.command}}
Expand Down

0 comments on commit fc1be78

Please # to comment.