feat: sniffer's force-domain and skip-domain support rule-set: and geosite:

This commit is contained in:
wwqgtxx
2024-08-14 22:38:17 +08:00
parent 696b75ee37
commit 7fd0467aef
7 changed files with 166 additions and 112 deletions

View File

@@ -134,6 +134,13 @@ func (t *DomainTrie[T]) Foreach(fn func(domain string, data T) bool) {
}
}
func (t *DomainTrie[T]) IsEmpty() bool {
if t == nil {
return true
}
return t.root.isEmpty()
}
func recursion[T any](items []string, node *Node[T], fn func(domain string, data T) bool) bool {
for key, data := range node.getChildren() {
newItems := append([]string{key}, items...)