TlsOnly - only accept TLS connections if enabled

This commit is contained in:
Guy Lewin committed 2020-02-10 18:56:41 +02:00
1 parent c8748a2948
commit c747f160aa
3 files changed
+17 -2

No files matched your search

+1 -1
View File
@@ -284,7 +284,7 @@ func (svr *Service) HandleListener(l net.Listener) {
log.Trace("start check TLS connection...")
originConn := c
c, err = frpNet.CheckAndEnableTLSServerConnWithTimeout(c, svr.tlsConfig, connReadTimeout)
c, err = frpNet.CheckAndEnableTLSServerConnWithTimeout(c, svr.tlsConfig, svr.cfg.TlsOnly, connReadTimeout)
if err != nil {
log.Warn("CheckAndEnableTLSServerConnWithTimeout error: %v", err)
originConn.Close()