|
|
@ -412,6 +412,7 @@ func HandleTcpWorkConnection(localInfo *config.LocalSvrConf, proxyPlugin plugin.
|
|
|
|
err error
|
|
|
|
err error
|
|
|
|
)
|
|
|
|
)
|
|
|
|
remote = workConn
|
|
|
|
remote = workConn
|
|
|
|
|
|
|
|
defer remote.Close()
|
|
|
|
if baseInfo.UseEncryption {
|
|
|
|
if baseInfo.UseEncryption {
|
|
|
|
remote, err = frpIo.WithEncryption(remote, encKey)
|
|
|
|
remote, err = frpIo.WithEncryption(remote, encKey)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -433,7 +434,6 @@ func HandleTcpWorkConnection(localInfo *config.LocalSvrConf, proxyPlugin plugin.
|
|
|
|
localConn, err := frpNet.ConnectServer("tcp", fmt.Sprintf("%s:%d", localInfo.LocalIp, localInfo.LocalPort))
|
|
|
|
localConn, err := frpNet.ConnectServer("tcp", fmt.Sprintf("%s:%d", localInfo.LocalIp, localInfo.LocalPort))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
workConn.Error("connect to local service [%s:%d] error: %v", localInfo.LocalIp, localInfo.LocalPort, err)
|
|
|
|
workConn.Error("connect to local service [%s:%d] error: %v", localInfo.LocalIp, localInfo.LocalPort, err)
|
|
|
|
remote.Close()
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|