mirror of
https://github.com/fatedier/frp.git
synced 2026-01-11 22:23:12 +00:00
fix lint (#5068)
This commit is contained in:
@@ -249,6 +249,22 @@ type VirtualNetConfig struct {
|
||||
Address string `json:"address,omitempty"`
|
||||
}
|
||||
|
||||
const (
|
||||
UnsafeFeatureTokenSourceExec = "TokenSourceExec"
|
||||
)
|
||||
|
||||
type UnsafeFeatures struct {
|
||||
TokenSourceExec bool
|
||||
features map[string]bool
|
||||
}
|
||||
|
||||
func NewUnsafeFeatures(allowed []string) UnsafeFeatures {
|
||||
features := make(map[string]bool)
|
||||
for _, f := range allowed {
|
||||
features[f] = true
|
||||
}
|
||||
return UnsafeFeatures{features: features}
|
||||
}
|
||||
|
||||
func (u UnsafeFeatures) IsEnabled(feature string) bool {
|
||||
return u.features[feature]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user