diff --git a/component/routing/domain_matcher/benchmark_test.go b/component/routing/domain_matcher/benchmark_test.go index 272e1001c..ae8da48eb 100644 --- a/component/routing/domain_matcher/benchmark_test.go +++ b/component/routing/domain_matcher/benchmark_test.go @@ -7,12 +7,13 @@ package domain_matcher import ( "fmt" - "github.com/daeuniverse/dae/common/assets" "hash/fnv" "math/rand" "reflect" "testing" + "github.com/daeuniverse/dae/common/assets" + "github.com/daeuniverse/dae/common/consts" "github.com/daeuniverse/dae/component/routing" "github.com/daeuniverse/dae/config" @@ -93,6 +94,8 @@ var TestSample = []string{ "psbc.com", "spdb.com.cn", "whccb.com", + "_https._tcp.mirrors.ustc.edu.cn", + "ipv4.master.test-ipv6.com", } type RoutingMatcherBuilder struct { @@ -132,7 +135,9 @@ func getDomain() (simulatedDomainSet []routing.DomainSet, err error) { var rules []*config_parser.RoutingRule sections, err := config_parser.Parse(` routing { + domain(suffix: test-ipv6.com)->direct domain(geosite:bing)->us + domain(_https._tcp.mirrors.ustc.edu.cn)->us domain(full:dns.google.com) -> direct domain(geosite:category-ads-all) -> block domain(geosite:cn) -> direct diff --git a/go.mod b/go.mod index a65eca5c0..462fa94f8 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/safchain/ethtool v0.3.0 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 - github.com/v2rayA/ahocorasick-domain v0.0.0-20230218160829-122a074c48c8 + github.com/v2rayA/ahocorasick-domain v0.0.0-20231231085011-99ceb8ef3208 github.com/vishvananda/netlink v1.1.0 github.com/x-cray/logrus-prefixed-formatter v0.5.2 golang.org/x/crypto v0.11.0 diff --git a/go.sum b/go.sum index 4fc883ce0..82f401b68 100644 --- a/go.sum +++ b/go.sum @@ -143,8 +143,8 @@ github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg= github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= -github.com/v2rayA/ahocorasick-domain v0.0.0-20230218160829-122a074c48c8 h1:2Liq3JvM/acVQZ7Gq9U5PpznMzlFRPYMPQxC2yXSi74= -github.com/v2rayA/ahocorasick-domain v0.0.0-20230218160829-122a074c48c8/go.mod h1:mWch8I826zic/bKaCyE9ZZbWtFgEW0ox3EQ0NGm5DGw= +github.com/v2rayA/ahocorasick-domain v0.0.0-20231231085011-99ceb8ef3208 h1:s/K1ome/+rTDictkqGhqLuAleUymyWnvgNWARjblS9U= +github.com/v2rayA/ahocorasick-domain v0.0.0-20231231085011-99ceb8ef3208/go.mod h1:mWch8I826zic/bKaCyE9ZZbWtFgEW0ox3EQ0NGm5DGw= github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=