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