vendor: add package golib/net

This commit is contained in:
fatedier
2018-05-09 00:23:42 +08:00
parent a27e3dda88
commit 20fcb58437
10 changed files with 103 additions and 159 deletions

View File

@ -25,6 +25,7 @@ import (
frpNet "github.com/fatedier/frp/utils/net"
frpIo "github.com/fatedier/golib/io"
gnet "github.com/fatedier/golib/net"
)
const PluginHttpProxy = "http_proxy"
@ -66,7 +67,7 @@ func (hp *HttpProxy) Name() string {
func (hp *HttpProxy) Handle(conn io.ReadWriteCloser, realConn frpNet.Conn) {
wrapConn := frpNet.WrapReadWriteCloserToConn(conn, realConn)
sc, rd := frpNet.NewShareConn(wrapConn)
sc, rd := gnet.NewSharedConn(wrapConn)
firstBytes := make([]byte, 7)
_, err := rd.Read(firstBytes)
if err != nil {