mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-05 21:07:41 +03:00
Refine geosite
This commit is contained in:
parent
5991cfc072
commit
12408d60a0
27 changed files with 739 additions and 263 deletions
|
@ -258,13 +258,18 @@ func NewLocalClient(f *flags) (*LocalClient, error) {
|
|||
return nil, E.Cause(err, "geosite.dat not found")
|
||||
}
|
||||
|
||||
geositeMatcher, err := geosite.LoadGeositeMatcher(geodata, f.Bypass)
|
||||
site, err := geosite.ReadArray(geodata, f.Bypass)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
geositeMatcher, err := geosite.NewMatcher(site)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client.Matcher = geositeMatcher
|
||||
debug.FreeOSMemory()
|
||||
}
|
||||
debug.FreeOSMemory()
|
||||
|
||||
return client, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue