jpillora / ipfilter

A package for IP Filtering in Go (golang)
MIT License
387 stars 47 forks source link

fixes for IPDBPath without `.gz` #7

Closed liut closed 4 years ago

liut commented 6 years ago

example scene:

f, err := New(Options{
    IPDBPath:       "/var/tmp/GeoLite2-Country.mmdb",
    IPDBNoFetch:    true,
    AllowedIPs:     []string{"222.25.118.1"},
    BlockByDefault: true,
})
jpillora commented 4 years ago

Thanks for your work, though I've just pushed a change to remove maxminddb, in favour of iplocation data (see https://github.com/phuslu/geoip)