vendor: update

This commit is contained in:
fatedier
2018-05-09 00:57:55 +08:00
parent 20fcb58437
commit 071cbf4b15
21 changed files with 1645 additions and 805 deletions

View File

@@ -24,6 +24,7 @@ import (
"github.com/fatedier/frp/utils/log"
gnet "github.com/fatedier/golib/net"
kcp "github.com/fatedier/kcp-go"
)
@@ -123,7 +124,11 @@ func ConnectServer(protocol string, addr string) (c Conn, err error) {
func ConnectServerByProxy(proxyUrl string, protocol string, addr string) (c Conn, err error) {
switch protocol {
case "tcp":
return ConnectTcpServerByProxy(proxyUrl, addr)
var conn net.Conn
if conn, err = gnet.DialTcpByProxy(proxyUrl, addr); err != nil {
return
}
return WrapConn(conn), nil
case "kcp":
// http proxy is not supported for kcp
return ConnectServer(protocol, addr)