Add inline rule-set & Add reload for local rule-set

This commit is contained in:
世界
2024-06-26 00:43:51 +08:00
parent 7e76f22180
commit 19346d5fef
14 changed files with 311 additions and 280 deletions

View File

@@ -20,8 +20,8 @@ import (
func NewRuleSet(ctx context.Context, router adapter.Router, logger logger.ContextLogger, options option.RuleSet) (adapter.RuleSet, error) {
switch options.Type {
case C.RuleSetTypeLocal:
return NewLocalRuleSet(router, options)
case C.RuleSetTypeInline, C.RuleSetTypeLocal, "":
return NewLocalRuleSet(router, logger, options)
case C.RuleSetTypeRemote:
return NewRemoteRuleSet(ctx, router, logger, options), nil
default: