fatedier/frp · error
unsafe feature %q is not enabled. To enable it, ensure it is
Error message
unsafe feature %q is not enabled. To enable it, ensure it is allowed in the configuration or command line flags
What it means
Error "unsafe feature %q is not enabled. To enable it, ensure it is allowed in the configuration or command line flags" thrown in fatedier/frp.
Source
Thrown at pkg/config/v1/validation/validator.go:24
"github.com/fatedier/frp/pkg/policy/security"
)
// ConfigValidator holds the context dependencies for configuration validation.
type ConfigValidator struct {
unsafeFeatures *security.UnsafeFeatures
}
// NewConfigValidator creates a new ConfigValidator instance.
func NewConfigValidator(unsafeFeatures *security.UnsafeFeatures) *ConfigValidator {
return &ConfigValidator{
unsafeFeatures: unsafeFeatures,
}
}
// ValidateUnsafeFeature checks if a specific unsafe feature is enabled.
func (v *ConfigValidator) ValidateUnsafeFeature(feature string) error {
if !v.unsafeFeatures.IsEnabled(feature) {
return fmt.Errorf("unsafe feature %q is not enabled. "+
"To enable it, ensure it is allowed in the configuration or command line flags", feature)
}
return nil
}
View on GitHub (pinned to 6c8a8d0a97)
Solutions
- Add the feature name to the unsafe features allow-list in the configuration or in the command line flags.
- Remove the configuration that uses this unsafe feature if it is not required.
When it happens
Trigger: Raised by ConfigValidator.ValidateUnsafeFeature in pkg/config/v1/validation/validator.go when the config uses a feature classified as unsafe that is not in the enabled unsafe-features set.
Common situations: A config uses an unsafe feature (e.g. certain plugins or options) without opting in. Fix by allowing the feature via the unsafe-features configuration/flags, or removing the unsafe option.
AI-assisted analysis of fatedier/frp@6c8a8d0a97 (2026-08-15).
Data as JSON: /api/errors/71934587f86b413d.
Report an issue: GitHub.