Add rule-set

This commit is contained in:
世界
2023-12-01 13:24:12 +08:00
parent 7df151e820
commit 4b43acfec0
51 changed files with 2975 additions and 265 deletions

View File

@@ -43,6 +43,7 @@ func (r *Router) matchDNS(ctx context.Context) (context.Context, dns.Transport,
panic("no context")
}
for i, rule := range r.dnsRules {
metadata.ResetRuleCache()
if rule.Match(metadata) {
detour := rule.Outbound()
transport, loaded := r.transportMap[detour]