2022-08-12 06:02:06 -04:00
|
|
|
package core
|
|
|
|
|
|
|
|
import (
|
2022-08-16 01:04:33 -04:00
|
|
|
"github.com/Yuzuki616/V2bX/api/panel"
|
2022-08-12 06:02:06 -04:00
|
|
|
)
|
|
|
|
|
2022-08-16 01:04:33 -04:00
|
|
|
func (p *Core) UpdateRule(tag string, newRuleList []panel.DetectRule) error {
|
2022-08-12 06:44:56 -04:00
|
|
|
return p.dispatcher.RuleManager.UpdateRule(tag, newRuleList)
|
2022-08-12 06:02:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Core) UpdateProtocolRule(tag string, newRuleList []string) error {
|
2022-08-12 06:44:56 -04:00
|
|
|
|
|
|
|
return p.dispatcher.RuleManager.UpdateProtocolRule(tag, newRuleList)
|
2022-08-12 06:02:06 -04:00
|
|
|
}
|
|
|
|
|
2022-08-16 01:04:33 -04:00
|
|
|
func (p *Core) GetDetectResult(tag string) ([]panel.DetectResult, error) {
|
2022-08-12 06:02:06 -04:00
|
|
|
return p.dispatcher.RuleManager.GetDetectResult(tag)
|
|
|
|
}
|