Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: GeoSite & GeoIP #643

Open
wants to merge 27 commits into
base: dns
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Style: comment unused code
  • Loading branch information
AkinoKaede committed Apr 8, 2021
commit 9721ff7a569a4a1c26f9a197cf76379f85f837f2
4 changes: 2 additions & 2 deletions common/matcher/geoip/conf.go
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ func LoadIPFile(file, code string) ([]*CIDR, error) {
}
defer runtime.GC() // or debug.FreeOSMemory()
return geoipdat.Cidr, nil // do not cache geoip
IPCache[index] = &geoipdat
// IPCache[index] = &geoipdat
}
return IPCache[index].Cidr, nil
}
@@ -53,7 +53,7 @@ func loadFile(file string) ([]byte, error) {
// Do not cache file, may save RAM when there
// are many files, but consume CPU each time.
return bs, nil
FileCache[file] = bs
// FileCache[file] = bs
}
return FileCache[file], nil
}