Add GeoIP and GeoSite support for expr (#38)

* feat: copy something from hysteria/extras/outbounds/acl

* feat: add geoip and geosite support for expr

* refactor: geo matcher

* fix: typo

* refactor: geo matcher

* feat: expose config options to specify local geoip/geosite db files

* refactor: engine.Config should not contains geo

* feat: make geosite and geoip lazy downloaded

* chore: minor code improvement

* docs: add geoip/geosite usage

---------

Co-authored-by: Toby <tobyxdd@gmail.com>
This commit is contained in:
Rinka
2024-01-31 09:30:35 +08:00
committed by GitHub
parent e23f8e06a2
commit f07a38bc47
16 changed files with 1502 additions and 7 deletions

View File

@@ -92,3 +92,8 @@ type Ruleset interface {
// It must be safe for concurrent use by multiple workers.
Match(StreamInfo) (MatchResult, error)
}
type BuiltinConfig struct {
GeoSiteFilename string
GeoIpFilename string
}