fix by comment, later to rebase
This commit is contained in:
parent
09ff73dbdc
commit
02c7a3c8f7
@ -18,7 +18,6 @@ import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"github.com/fatedier/frp/models/transport"
|
||||
"io"
|
||||
"net"
|
||||
"runtime/debug"
|
||||
@ -29,6 +28,7 @@ import (
|
||||
"github.com/fatedier/frp/models/auth"
|
||||
"github.com/fatedier/frp/models/config"
|
||||
"github.com/fatedier/frp/models/msg"
|
||||
"github.com/fatedier/frp/models/transport"
|
||||
frpNet "github.com/fatedier/frp/utils/net"
|
||||
"github.com/fatedier/frp/utils/xlog"
|
||||
|
||||
|
@ -350,18 +350,15 @@ func (cfg *ClientCommonConf) Check() (err error) {
|
||||
|
||||
if cfg.TLSEnable == false {
|
||||
if cfg.TLSCertFile != "" {
|
||||
err = fmt.Errorf("Parse conf error: forbidden tls_cert_file, it only works when tls_enabled is true")
|
||||
return
|
||||
fmt.Println("WARNING! Because tls_enable is not true, so tls_cert_file will not make sense")
|
||||
}
|
||||
|
||||
if cfg.TLSKeyFile != "" {
|
||||
err = fmt.Errorf("Parse conf error: forbidden tls_key_file, it only works when tls_enabled is true")
|
||||
return
|
||||
fmt.Println("WARNING! Because tls_enable is not true, so tls_key_file will not make sense")
|
||||
}
|
||||
|
||||
if cfg.TLSTrustedCaFile != "" {
|
||||
err = fmt.Errorf("Parse conf error: forbidden tls_trusted_ca_file, it only works when tls_enabled is true")
|
||||
return
|
||||
fmt.Println("WARNING! Because tls_enable is not true, so tls_trusted_ca_file will not make sense")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,6 @@ func NewServerTLSConfig(certPath, keyPath, caPath string ) (*tls.Config, error)
|
||||
return base, nil
|
||||
}
|
||||
|
||||
|
||||
func NewClientTLSConfig(certPath, keyPath, caPath, servearName string) (*tls.Config, error) {
|
||||
var base = &tls.Config{}
|
||||
|
||||
|
@ -19,7 +19,6 @@ import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"github.com/fatedier/frp/models/transport"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
@ -33,6 +32,7 @@ import (
|
||||
"github.com/fatedier/frp/models/msg"
|
||||
"github.com/fatedier/frp/models/nathole"
|
||||
plugin "github.com/fatedier/frp/models/plugin/server"
|
||||
"github.com/fatedier/frp/models/transport"
|
||||
"github.com/fatedier/frp/server/controller"
|
||||
"github.com/fatedier/frp/server/group"
|
||||
"github.com/fatedier/frp/server/metrics"
|
||||
|
Loading…
Reference in New Issue
Block a user