mirror of
https://github.com/fatedier/frp.git
synced 2024-12-13 18:21:14 +01:00
fix plugin http_proxy error
This commit is contained in:
parent
902f6f84a5
commit
a6f2736b80
@ -412,10 +412,11 @@ func HandleTcpWorkConnection(localInfo *config.LocalSvrConf, proxyPlugin plugin.
|
||||
err error
|
||||
)
|
||||
remote = workConn
|
||||
defer remote.Close()
|
||||
|
||||
if baseInfo.UseEncryption {
|
||||
remote, err = frpIo.WithEncryption(remote, encKey)
|
||||
if err != nil {
|
||||
workConn.Close()
|
||||
workConn.Error("create encryption stream error: %v", err)
|
||||
return
|
||||
}
|
||||
@ -433,6 +434,7 @@ func HandleTcpWorkConnection(localInfo *config.LocalSvrConf, proxyPlugin plugin.
|
||||
} else {
|
||||
localConn, err := frpNet.ConnectServer("tcp", fmt.Sprintf("%s:%d", localInfo.LocalIp, localInfo.LocalPort))
|
||||
if err != nil {
|
||||
workConn.Close()
|
||||
workConn.Error("connect to local service [%s:%d] error: %v", localInfo.LocalIp, localInfo.LocalPort, err)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user