mirror of
https://github.com/fatedier/frp.git
synced 2025-07-08 14:58:39 +07:00
fix create tls work connection (#2013)
This commit is contained in:
@ -211,10 +211,11 @@ func (ctl *Control) connectServer() (conn net.Conn, err error) {
|
||||
var tlsConfig *tls.Config
|
||||
|
||||
if ctl.clientCfg.TLSEnable {
|
||||
tlsConfig, err = transport.NewServerTLSConfig(
|
||||
tlsConfig, err = transport.NewClientTLSConfig(
|
||||
ctl.clientCfg.TLSCertFile,
|
||||
ctl.clientCfg.TLSKeyFile,
|
||||
ctl.clientCfg.TLSTrustedCaFile)
|
||||
ctl.clientCfg.TLSTrustedCaFile,
|
||||
ctl.clientCfg.ServerAddr)
|
||||
|
||||
if err != nil {
|
||||
xl.Warn("fail to build tls configuration when connecting to server, err: %v", err)
|
||||
|
Reference in New Issue
Block a user