升级到 0.25.1

This commit is contained in:
haidy 2019-03-24 08:33:36 +08:00
parent d51527959b
commit 1eb4a917fe
2 changed files with 4 additions and 5 deletions

View File

@ -16,7 +16,6 @@ package client
import (
"crypto/tls"
"fmt"
"io"
"runtime/debug"
"sync"
@ -182,7 +181,7 @@ func (ctl *Control) connectServer() (conn frpNet.Conn, err error) {
InsecureSkipVerify: true,
}
}
conn, err = frpNet.ConnectServerByProxy(g.GlbClientCfg.HttpProxy, g.GlbClientCfg.Protocol,
conn, err = frpNet.ConnectServerByProxyWithTLS(g.GlbClientCfg.HttpProxy, g.GlbClientCfg.Protocol,
newAddress(g.GlbClientCfg.ServerAddr, g.GlbClientCfg.ServerPort), tlsConfig)
if err != nil {
ctl.Warn("start new connection to server error: %v", err)

View File

@ -170,15 +170,15 @@ func (svr *Service) login() (conn frpNet.Conn, session *fmux.Session, err error)
InsecureSkipVerify: true,
}
}
conn, err = frpNet.ConnectServerByProxy(g.GlbClientCfg.HttpProxy, g.GlbClientCfg.Protocol,
conn, err = frpNet.ConnectServerByProxyWithTLS(g.GlbClientCfg.HttpProxy, g.GlbClientCfg.Protocol,
newAddress(g.GlbClientCfg.ServerAddr, g.GlbClientCfg.ServerPort), tlsConfig)
if err != nil {
return
}
defer func() {
if err != nil {
conn.Close()
if err != nil && conn != nil {
_ = conn.Close()
}
}()