feat: Add succinct matcher support for GeoSite

and use it by default
This commit is contained in:
H1JK
2023-12-17 00:00:35 +08:00
parent 5b23b979df
commit 2bba8aa14a
9 changed files with 122 additions and 35 deletions

View File

@@ -74,7 +74,7 @@ func (df *domainFilter) Match(domain string) bool {
}
type geoSiteFilter struct {
matchers []*router.DomainMatcher
matchers []router.DomainMatcher
}
func NewGeoSite(group string) (fallbackDomainFilter, error) {
@@ -87,7 +87,7 @@ func NewGeoSite(group string) (fallbackDomainFilter, error) {
return nil, err
}
filter := &geoSiteFilter{
matchers: []*router.DomainMatcher{matcher},
matchers: []router.DomainMatcher{matcher},
}
return filter, nil
}

View File

@@ -400,7 +400,7 @@ type FallbackFilter struct {
GeoIPCode string
IPCIDR []netip.Prefix
Domain []string
GeoSite []*router.DomainMatcher
GeoSite []router.DomainMatcher
}
type Config struct {