4 Commits

Author SHA1 Message Date
c6da1e7e4a
feat(iplist): accept "source" as header name in addition to "network"
Some deployments used "source,comment" as the CSV header for IP list
files, but the parser only recognized "network" as a header row.
Accept both "network" and "source" (case-insensitive) to avoid
treating the header as a (non-existent) domain entry.
2026-09-18 22:59:45 -06:00
48a4f2a145
refactor(net/iplist): use released cache APIs 2026-09-10 00:21:39 -06:00
03722a2934
feat(iplist): allow custom HTTP clients 2026-09-09 01:14:05 -06:00
c41ac3732d
feat(iplist): load and validate IP policy entries from TSV/CSV sources
Add net/iplist for shared IP-policy source loading.

- Accept local TSV/CSV file paths or HTTP(S) URLs (including Google Sheets).
- Auto-detect TSV vs CSV format from file content.
- Send Accept: text/tab-separated-values header for content negotiation.
- Parse the first column and ignore comments (#) and optional "network" header.
- Expand nested list URLs up to MaxNestedSources (2) levels.
- Support Basic Auth from URL userinfo without sending credentials in the URL.
- Persist cached URL responses across restarts via httpcache.
- Refresh periodically and preserve the known-good cache on fetch or parse failure.
- Validate entries as IP address, CIDR range, or domain name (Validate()).
- Use golib/https.NewInternalClient() through httpcache.NewWith.
- Add README with usage examples and entry format documentation.
2026-09-08 22:46:17 -06:00