Skip to content

Commit eeea760

Browse files
presidentenJohan Hernefeldt
andauthored
bugfix: Issue fatedier#2831 - Cant connect to frps behind ingress with tls (fatedier#2832)
Co-authored-by: Johan Hernefeldt <[email protected]>
1 parent bf635c0 commit eeea760

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/transport/tls.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,15 @@ func NewClientTLSConfig(certPath, keyPath, caPath, serverName string) (*tls.Conf
100100
base.Certificates = []tls.Certificate{*cert}
101101
}
102102

103+
base.ServerName = serverName
104+
103105
if caPath != "" {
104106
pool, err := newCertPool(caPath)
105107
if err != nil {
106108
return nil, err
107109
}
108110

109111
base.RootCAs = pool
110-
base.ServerName = serverName
111112
base.InsecureSkipVerify = false
112113
} else {
113114
base.InsecureSkipVerify = true

0 commit comments

Comments
 (0)