mirror of
https://github.com/fatedier/frp.git
synced 2026-03-24 09:08:13 +08:00
fix by golint (#1822)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user