fix: add _ into valid charset of ac machine (#388)

This commit is contained in:
mzz
2024-01-01 16:06:53 +08:00
committed by GitHub
parent 366fcb192a
commit d7ea7f6c1d
3 changed files with 9 additions and 4 deletions

View File

@ -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