mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-22 08:18:29 +02:00
feat(acl): connection level ip/geo blocking
- fixed access log logic - implement acl at connection level - acl logging - ip/cidr blocking - geoblocking with MaxMind database
This commit is contained in:
10
internal/acl/types/city_info.go
Normal file
10
internal/acl/types/city_info.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package acl
|
||||
|
||||
type City struct {
|
||||
Location struct {
|
||||
TimeZone string `maxminddb:"time_zone"`
|
||||
} `maxminddb:"location"`
|
||||
Country struct {
|
||||
IsoCode string `maxminddb:"iso_code"`
|
||||
} `maxminddb:"country"`
|
||||
}
|
||||
9
internal/acl/types/ip_info.go
Normal file
9
internal/acl/types/ip_info.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package acl
|
||||
|
||||
import "net"
|
||||
|
||||
type IPInfo struct {
|
||||
IP net.IP
|
||||
Str string
|
||||
City *City
|
||||
}
|
||||
Reference in New Issue
Block a user