8 Commits

Author SHA1 Message Date
4895553a91
refactor: move atomic swaps and polling loop into main
Sources (blacklist.go) now owns only fetch/load logic — no atomic state.
main.go holds the three atomic.Pointer[Cohort] vars, calls reload() on
startup, and runs the background ticker directly. This makes the dataset
pattern (fetch → load → atomic.Store → poll) visible at the call site.
2026-04-19 23:36:38 -06:00
e2236aa09b
refactor: remove callbacks from gitshallow and httpcache
Top-layer callers (IPFilter) now drive all reloads directly after
Sync/Fetch return. gitshallow.Init now returns (bool, error).
httpcache drops Init and Sync — callers just call Fetch.
2026-04-19 23:30:30 -06:00
5f48a9beaa
feat: ipcohort filter with inbound/outbound/whitelist cohorts
Blacklist → IPFilter with three separate atomic cohorts: whitelist
(never blocked), inbound, and outbound. ContainsInbound/ContainsOutbound
each skip the whitelist. HTTP sync fetches all cachers before a single
reload to avoid double-load. Also fixes httpcache.Init calling c.Fetch().
2026-04-19 23:17:12 -06:00
ff224c5bb1
feat: support split single_ips/networks files; ipcohort.LoadFiles variadic 2026-04-19 23:01:51 -06:00
a9adc3dc18
feat: add net/httpcache; wire git+http+file into Blacklist 2026-04-19 22:57:36 -06:00
4b0f943bd7
feat: add Blacklist type to check-ip-blacklist to test ergonomics 2026-04-19 22:55:39 -06:00
29f9760f4d
wip: feat: add net/gitdataset for data that updates via git 2026-04-19 19:49:52 -06:00
98fb592435
f: ipcohort / blacklist 2026-04-19 19:34:21 -06:00