mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
feat: Add succinct matcher support for GeoSite
and use it by default
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -400,7 +400,7 @@ type FallbackFilter struct {
|
||||
GeoIPCode string
|
||||
IPCIDR []netip.Prefix
|
||||
Domain []string
|
||||
GeoSite []*router.DomainMatcher
|
||||
GeoSite []router.DomainMatcher
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
|
||||
Reference in New Issue
Block a user