refactor: reorganize security policy into dedicated packag (#5088)

This commit is contained in:
fatedier
2025-12-05 16:26:09 +08:00
committed by GitHub
parent 2e2802ea13
commit 0fe8f7a0b6
8 changed files with 136 additions and 71 deletions

View File

@@ -21,8 +21,8 @@ import (
"github.com/spf13/cobra"
"github.com/fatedier/frp/pkg/config"
v1 "github.com/fatedier/frp/pkg/config/v1"
"github.com/fatedier/frp/pkg/config/v1/validation"
"github.com/fatedier/frp/pkg/policy/security"
)
func init() {
@@ -43,7 +43,7 @@ var verifyCmd = &cobra.Command{
fmt.Println(err)
os.Exit(1)
}
unsafeFeatures := v1.NewUnsafeFeatures(allowUnsafe)
unsafeFeatures := security.NewUnsafeFeatures(allowUnsafe)
warning, err := validation.ValidateAllClientConfig(cliCfg, proxyCfgs, visitorCfgs, unsafeFeatures)
if warning != nil {
fmt.Printf("WARNING: %v\n", warning)