mirror of
https://github.com/therootcompany/golib.git
synced 2026-11-04 15:05:00 +00:00
PrefixSet: git-backed CIDR files via gitshallow, refreshed every 47 min. DomainSet: takes pre-parsed (staticPrefixes, domains []string); resolves hostnames every 5 min, retaining stale IPs on failure. Both use atomic-swapped ipcohort.Cohort for lock-free reads. ParseDomainSet(RecordReader) parses rows into prefixes and hostnames; caller constructs the record reader (e.g. csv.Reader with delimiter, comment char). RecordReader interface is satisfied by *csv.Reader. commaify uses plain string concat (integers max ~7 groups).
19 lines
486 B
Modula-2
19 lines
486 B
Modula-2
module github.com/therootcompany/golib/net/ipgate
|
|
|
|
go 1.26.0
|
|
|
|
require (
|
|
github.com/therootcompany/golib/net/dnsresolver v0.5.0
|
|
github.com/therootcompany/golib/net/gitshallow v0.9.1
|
|
github.com/therootcompany/golib/net/ipcohort v0.9.0
|
|
)
|
|
|
|
require (
|
|
github.com/miekg/dns v1.1.69 // indirect
|
|
golang.org/x/mod v0.30.0 // indirect
|
|
golang.org/x/net v0.47.0 // indirect
|
|
golang.org/x/sync v0.20.0 // indirect
|
|
golang.org/x/sys v0.38.0 // indirect
|
|
golang.org/x/tools v0.39.0 // indirect
|
|
)
|