This commit is contained in:
MetaCubeX
2022-03-17 23:24:07 +08:00
parent 30f1b29257
commit 435bee0ca2
37 changed files with 329 additions and 727 deletions

View File

@ -14,16 +14,12 @@ import (
type GEOIP struct {
*Base
country string
adapter string
noResolveIP bool
country string
adapter string
noResolveIP bool
geoIPMatcher *router.GeoIPMatcher
}
func (g *GEOIP) ShouldFindProcess() bool {
return false
}
func (g *GEOIP) RuleType() C.RuleType {
return C.GEOIP
}
@ -87,7 +83,7 @@ func NewGEOIP(country string, adapter string, noResolveIP bool) (*GEOIP, error)
log.Infoln("Start initial GeoIP rule %s => %s, records: %d", country, adapter, recordsCount)
geoip := &GEOIP{
Base: &Base{},
Base: &Base{},
country: country,
adapter: adapter,
noResolveIP: noResolveIP,