move plugin safety metadata to registry

This commit is contained in:
ZacharyZcR
2026-05-18 15:57:18 +08:00
parent d4ed0867c9
commit 3dde0c6a8e
5 changed files with 52 additions and 32 deletions
+7
View File
@@ -22,3 +22,10 @@ func RegisterWebPlugin(name string, creator func() WebPlugin) {
return creator()
}, []int{}, []string{plugins.PluginTypeWeb})
}
// RegisterUnsafeWebPlugin 注册需要显式授权的主动Web插件。
func RegisterUnsafeWebPlugin(name string, creator func() WebPlugin) {
plugins.RegisterUnsafeWithTypes(name, func() plugins.Plugin {
return creator()
}, []int{}, []string{plugins.PluginTypeWeb})
}
+1 -1
View File
@@ -130,7 +130,7 @@ func matchCDNorWAF(fingerprints []string) string {
// init 自动注册插件
func init() {
RegisterWebPlugin("webpoc", func() WebPlugin {
RegisterUnsafeWebPlugin("webpoc", func() WebPlugin {
return NewWebPocPlugin()
})
}