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

@@ -9,6 +9,8 @@ import (
"github.com/metacubex/mihomo/component/profile/cachefile"
"github.com/metacubex/mihomo/component/trie"
C "github.com/metacubex/mihomo/constant"
RP "github.com/metacubex/mihomo/rules/provider"
"github.com/sagernet/bbolt"
"github.com/stretchr/testify/assert"
@@ -154,7 +156,7 @@ func TestPool_Skip(t *testing.T) {
pools, tempfile, err := createPools(Options{
IPNet: ipnet,
Size: 10,
Host: tree,
Host: []C.Rule{RP.NewDomainSet(tree.NewDomainSet(), "")},
})
assert.Nil(t, err)
defer os.Remove(tempfile)