Skip to content

Commit

Permalink
fix: add _ into valid charset of ac machine (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzz2017 committed Jan 1, 2024
1 parent 366fcb1 commit d7ea7f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion component/routing/domain_matcher/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,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=
Expand Down

0 comments on commit d7ea7f6

Please sign in to comment.