chore: 更新geox时通过内存存储

This commit is contained in:
adlyq
2022-06-03 16:50:05 +08:00
parent 1ad87cfec9
commit 6e84f685ce
6 changed files with 103 additions and 86 deletions

View File

@ -30,7 +30,7 @@ func (l *loader) LoadGeoSiteWithAttr(file string, siteWithAttr string) ([]*route
return nil, fmt.Errorf("empty listname in rule: %s", siteWithAttr)
}
domains, err := l.LoadSite(file, list)
domains, err := l.LoadSiteByPath(file, list)
if err != nil {
return nil, err
}
@ -59,7 +59,7 @@ func (l *loader) LoadGeoSiteWithAttr(file string, siteWithAttr string) ([]*route
}
func (l *loader) LoadGeoIP(country string) ([]*router.CIDR, error) {
return l.LoadIP(C.GeoipName, country)
return l.LoadIPByPath(C.GeoipName, country)
}
var loaders map[string]func() LoaderImplementation