mirror of
https://github.com/fatedier/frp.git
synced 2025-07-27 07:35:07 +00:00
io.Copy use pool buffer
This commit is contained in:
@@ -23,8 +23,8 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/fatedier/frp/models/proto/tcp"
|
||||
"github.com/fatedier/frp/utils/errors"
|
||||
frpIo "github.com/fatedier/frp/utils/io"
|
||||
frpNet "github.com/fatedier/frp/utils/net"
|
||||
)
|
||||
|
||||
@@ -177,7 +177,7 @@ func (hp *HttpProxy) ConnectHandler(rw http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
client.Write([]byte("HTTP/1.0 200 OK\r\n\r\n"))
|
||||
|
||||
go tcp.Join(remote, client)
|
||||
go frpIo.Join(remote, client)
|
||||
}
|
||||
|
||||
func (hp *HttpProxy) Auth(rw http.ResponseWriter, req *http.Request) bool {
|
||||
|
@@ -19,7 +19,7 @@ import (
|
||||
"io"
|
||||
"net"
|
||||
|
||||
"github.com/fatedier/frp/models/proto/tcp"
|
||||
frpIo "github.com/fatedier/frp/utils/io"
|
||||
)
|
||||
|
||||
const PluginUnixDomainSocket = "unix_domain_socket"
|
||||
@@ -57,7 +57,7 @@ func (uds *UnixDomainSocketPlugin) Handle(conn io.ReadWriteCloser) {
|
||||
return
|
||||
}
|
||||
|
||||
tcp.Join(localConn, conn)
|
||||
frpIo.Join(localConn, conn)
|
||||
}
|
||||
|
||||
func (uds *UnixDomainSocketPlugin) Name() string {
|
||||
|
Reference in New Issue
Block a user