fix by golint (#1822)

This commit is contained in:
fatedier
2020-05-24 17:48:37 +08:00
committed by GitHub
parent 2170c481ce
commit 8b75b8b837
80 changed files with 1315 additions and 1324 deletions

View File

@@ -24,11 +24,11 @@ import (
)
var (
FRP_TLS_HEAD_BYTE = 0x17
FRPTLSHeadByte = 0x17
)
func WrapTLSClientConn(c net.Conn, tlsConfig *tls.Config) (out net.Conn) {
c.Write([]byte{byte(FRP_TLS_HEAD_BYTE)})
c.Write([]byte{byte(FRPTLSHeadByte)})
out = tls.Client(c, tlsConfig)
return
}
@@ -44,7 +44,7 @@ func CheckAndEnableTLSServerConnWithTimeout(c net.Conn, tlsConfig *tls.Config, t
return
}
if n == 1 && int(buf[0]) == FRP_TLS_HEAD_BYTE {
if n == 1 && int(buf[0]) == FRPTLSHeadByte {
out = tls.Server(c, tlsConfig)
} else {
if tlsOnly {