forked from Mxmilu666/frp
utils/conn: add func joinMore
This commit is contained in:
@@ -82,8 +82,7 @@ func (p *ProxyClient) StartTunnel(serverAddr string, serverPort int64) (err erro
|
||||
log.Debug("Join two conns, (l[%s] r[%s]) (l[%s] r[%s])", localConn.GetLocalAddr(), localConn.GetRemoteAddr(),
|
||||
remoteConn.GetLocalAddr(), remoteConn.GetRemoteAddr())
|
||||
// go conn.Join(localConn, remoteConn)
|
||||
go conn.PipeEncryptoWriter(localConn.TcpConn, remoteConn.TcpConn, p.Passwd)
|
||||
go conn.PipeDecryptoReader(remoteConn.TcpConn, localConn.TcpConn, p.Passwd)
|
||||
go conn.JoinMore(localConn, remoteConn, p.Passwd)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -133,8 +133,7 @@ func (p *ProxyServer) Start() (err error) {
|
||||
log.Debug("Join two conns, (l[%s] r[%s]) (l[%s] r[%s])", cliConn.GetLocalAddr(), cliConn.GetRemoteAddr(),
|
||||
userConn.GetLocalAddr(), userConn.GetRemoteAddr())
|
||||
// go conn.Join(cliConn, userConn)
|
||||
go conn.PipeEncryptoWriter(userConn.TcpConn, cliConn.TcpConn, p.Passwd)
|
||||
go conn.PipeDecryptoReader(cliConn.TcpConn, userConn.TcpConn, p.Passwd)
|
||||
go conn.JoinMore(userConn, cliConn, p.Passwd)
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user