mirror of
https://github.com/fatedier/frp.git
synced 2025-07-27 07:35:07 +00:00
fix: add frpc tls_enable flag and frps tls_only flag (#1798)
This commit is contained in:
@@ -60,6 +60,7 @@ var (
|
||||
allowPorts string
|
||||
maxPoolCount int64
|
||||
maxPortsPerClient int64
|
||||
tlsOnly bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -87,6 +88,7 @@ func init() {
|
||||
rootCmd.PersistentFlags().StringVarP(&subDomainHost, "subdomain_host", "", "", "subdomain host")
|
||||
rootCmd.PersistentFlags().StringVarP(&allowPorts, "allow_ports", "", "", "allow ports")
|
||||
rootCmd.PersistentFlags().Int64VarP(&maxPortsPerClient, "max_ports_per_client", "", 0, "max ports per client")
|
||||
rootCmd.PersistentFlags().BoolVarP(&tlsOnly, "tls_only", "", false, "frps tls only")
|
||||
}
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
@@ -173,6 +175,7 @@ func parseServerCommonCfgFromCmd() (cfg config.ServerCommonConf, err error) {
|
||||
cfg.LogLevel = logLevel
|
||||
cfg.LogMaxDays = logMaxDays
|
||||
cfg.SubDomainHost = subDomainHost
|
||||
cfg.TlsOnly = tlsOnly
|
||||
|
||||
// Only token authentication is supported in cmd mode
|
||||
cfg.AuthServerConfig = auth.GetDefaultAuthServerConf()
|
||||
|
Reference in New Issue
Block a user