frpc: add disable_custom_tls_first_byte to not send first custom tls to frps (#2520)

This commit is contained in:
fatedier
2021-08-11 23:10:35 +08:00
committed by GitHub
parent 82f80a22be
commit 42745a3da2
8 changed files with 49 additions and 12 deletions

View File

@@ -228,7 +228,7 @@ func ConnectServerByProxy(proxyURL string, protocol string, addr string) (c net.
}
}
func ConnectServerByProxyWithTLS(proxyURL string, protocol string, addr string, tlsConfig *tls.Config) (c net.Conn, err error) {
func ConnectServerByProxyWithTLS(proxyURL string, protocol string, addr string, tlsConfig *tls.Config, disableCustomTLSHeadByte bool) (c net.Conn, err error) {
c, err = ConnectServerByProxy(proxyURL, protocol, addr)
if err != nil {
return
@@ -238,6 +238,6 @@ func ConnectServerByProxyWithTLS(proxyURL string, protocol string, addr string,
return
}
c = WrapTLSClientConn(c, tlsConfig)
c = WrapTLSClientConn(c, tlsConfig, disableCustomTLSHeadByte)
return
}