278 Commits

Author SHA1 Message Date
1753bd73d0
fix(csvx): skip blank records in ParseCSV, including before the header
Human-maintained sources (e.g. Google Sheets exports) routinely carry
stray blank rows. A blank row above the header was taken as the header,
so every data row decoded to zero values; blank data rows decoded as
empty records.

ParseCSV now wraps the stream in a streaming csvutil.Reader (skipBlanks)
that drops records whose cells are all empty or whitespace-only. Records
decode one at a time with a single record buffered; delimiter and
ragged-row behavior are unchanged, and all-blank input yields nil, nil.
2026-10-23 22:51:36 -06:00
466978c8ca
docs(auth): document Express cookie package auth/expresscookie/v0.9.0 2026-09-19 14:09:06 -06:00
6563695787
feat(auth): add Express signed cookie package 2026-09-19 14:09:06 -06:00
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.
net/iplist/v0.9.4
2026-09-18 22:59:45 -06:00
ca6e271f66
feat: add database/{csvx,rowsync,csvdb,pgdb,sheetsdb} database/v0.4.0 2026-09-16 16:20:08 -06:00
04aaadff75
fix(ippolicy): clear to empty evaluator net/ippolicy/v0.10.2 2026-09-10 02:35:57 -06:00
4b8425c1ac
fix(ippolicy): return empty evaluator on load failure net/ippolicy/v0.10.1 2026-09-10 02:23:14 -06:00
9a7a0f523c
chore: refresh downstream release checksums net/formmailer/v0.3.4 cmd/form2mail/v0.3.5 cmd/check-ip/v0.1.5 2026-09-10 02:14:23 -06:00
ef11c70896
chore: use ippolicy v0.10.0 cmd/check-ip/v0.1.4 cmd/form2mail/v0.3.4 net/geoip/v0.6.2 sync/dataset/v0.6.2 net/formmailer/v0.3.3 net/iplist/v0.9.3 2026-09-10 02:13:21 -06:00
177c862169
chore(net/ippolicy): use released iplist tag net/ippolicy/v0.10.0 net/ippolicy/v0.9.4 2026-09-10 02:12:16 -06:00
db2dbbc29c
chore: update stacked module releases cmd/check-ip/v0.1.3 cmd/form2mail/v0.3.3 net/formmailer/v0.3.2 2026-09-10 02:09:48 -06:00
61d068c95c
refactor(ippolicy): separate policy loading from evaluation net/ippolicy/v0.9.3 2026-09-10 02:09:17 -06:00
db1d4c55a9
refactor(sync): rename cacheable package net/geoip/v0.6.1 net/ippolicy/v0.9.2 net/iplist/v0.9.2 sync/cacheable/v0.1.0 sync/dataset/v0.6.1 2026-09-10 02:08:36 -06:00
7990917414
chore(cmd/form2mail): update stacked release dependencies
(cherry picked from commit 97606f9d1d511cf76431843a989ed76bed9f39db)
cmd/form2mail/v0.3.2
2026-09-10 01:13:46 -06:00
3cbb52ee36
refactor(cmd/form2mail): rebase release onto main
(cherry picked from commit bf052b4904918913250a7108e704ef5ac4f1c725)
2026-09-10 01:13:46 -06:00
8648c5accb
refactor(cmd/check-ip): use released cache modules cmd/check-ip/v0.1.2 2026-09-10 00:46:30 -06:00
4e85e00d5a
feat(cmd/check-ip): reference CLI exercising ipcohort + geoip + dataset 2026-09-10 00:46:30 -06:00
5221e0e1c3
chore(net/formmailer): update stacked release dependencies net/formmailer/v0.3.1 2026-09-10 00:46:23 -06:00
0e6faecf6c
refactor(net/formmailer): rebase release onto main 2026-09-10 00:45:56 -06:00
be816d8da0
chore(net/ippolicy): use released iplist tag net/ippolicy/v0.9.1 2026-09-10 00:45:12 -06:00
27ba97de6d
refactor(net/ippolicy): publish shared cache policy 2026-09-10 00:41:40 -06:00
48a4f2a145
refactor(net/iplist): use released cache APIs net/iplist/v0.9.1 2026-09-10 00:21:39 -06:00
87ab75126a
refactor(net/geoip): use released cache APIs net/geoip/v0.6.0 2026-09-09 23:35:39 -06:00
c43fd48b34
refactor(sync/dataset): use released cachable API 2026-09-09 23:35:21 -06:00
efa686e649
refactor(sync/cachable): finalize release API 2026-09-09 23:35:08 -06:00
fac7ffad84
refactor(net/httpcache): finalize release API 2026-09-09 23:34:52 -06:00
21cb0bc677
refactor(net/gitshallow): finalize release API 2026-09-09 23:34:39 -06:00
9d2f2cb402
refactor(net/dnsresolver): finalize release API net/dnsresolver/v0.6.0 2026-09-09 22:29:00 -06:00
b67ea17776 chore(net/ipcohort): whitespace 2026-09-09 03:20:28 -06:00
758fee503d test(gsheet2csv): cover empty rows, blank lines, and comments io/transform/gsheet2csv/v1.1.2 2026-09-09 03:20:28 -06:00
8a928d0e9c fix gsheet reader skip empty records 2026-09-09 03:20:28 -06:00
07d4a2652c
feat!(ippolicy): share refreshed IP policy behavior
Rename net/ipgate to net/ippolicy and compose independently refreshed
whitelist and blacklist sources into one IP decision policy.

- rename slog group and error prefixes from ipgate to ippolicy
- delete unused ParseDomainSet and RecordReader from domainsetcsv.go
- rewrite README to match the actual Config API
- document nil-whitelist behavior on New()
- bump iplist dependency to v0.8.5
- go mod tidy: remove stale ipgate and iplist entries
net/ippolicy/v0.8.5
2026-09-09 02:55:09 -06:00
869086ce0c
feat(iplist): add refreshable Source net/iplist/v0.8.5 2026-09-09 02:54:34 -06:00
1cb0235d9d
feat(ipgate): configure matcher refresh intervals net/ipgate/v0.6.2 2026-09-09 02:29:23 -06:00
03722a2934
feat(iplist): allow custom HTTP clients net/iplist/v0.7.0 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
a16ec976bb
feat(gsheet2csv): add context and custom-client APIs
Add non-breaking context-aware and custom-HTTP-client variants of the
existing reader and fetch functions:

- NewReaderFromContext / NewReaderFromContextWith
- NewReaderFromURLContext / NewReaderFromURLWith
- NewReaderFromIDsContext
- GetSheetContext

All existing function signatures are unchanged. The shared response
handling is extracted into newReaderFromResponse, and the legacy GetSheet
path is refactored through getSheetWithGet for clarity.
io/transform/gsheet2csv/v1.1.1
2026-09-08 22:46:11 -06:00
bb488fe230 fix(net/ipgate): prevent nil cohort by construction, extract cachedCohortValid
Ensure cohort is never nil:
- NewDomainSet stores an empty Cohort before rebuildCohort, so a parse
  failure leaves an empty (non-nil) cohort instead of nil
- Contains uses CompareAndSwap to lazily self-initialise a zero-value
  struct, making nil impossible after first access — no explicit nil
  check needed

Extract the cache-validity check into a testable cachedCohortValid()
helper and add filesPresent() to detect when data files exist on disk.

Use strings.Builder in commaify() for efficiency.

Tests:
- TestPrefixSetContainsZeroValue: zero-value self-heals via CAS,
  cohort is non-nil after first Contains call
- TestCachedCohortValidRequiresFiles: cache invalidation logic
net/ipgate/v0.5.3
2026-09-08 20:36:43 -06:00
70d95be546 test(net/gitshallow): support modern git orphan branches net/gitshallow/v0.9.3 2026-09-08 20:16:37 -06:00
4260287467 chore(net/gitshallow): add .goreleaser.yaml 2026-09-08 20:16:37 -06:00
f7ca1d22a5
feat(geoip-update): align CLI flags with conventions 2026-09-08 15:19:38 -06:00
e82e3979d2
fix(geoip): update httpcache dependency net/geoip/v0.5.1 2026-09-08 14:47:28 -06:00
05505c3554
fix(geoip-update): back off failed downloads 2026-09-08 14:44:48 -06:00
71f7752015
fix(httpcache): back off after failed fetches net/httpcache/v0.5.1 2026-09-08 14:44:48 -06:00
70aa1cbaa4
chore: remove comment io/transform/gsheet2csv/v1.1.0 2026-08-19 15:02:50 -06:00
1d16cabf87
doc(auth/jwt): add README.md (condensed from doc.go) auth/jwt/v0.10.1 2026-08-17 23:38:42 -06:00
392b8bc0f9
feat(auth/jwt): add HMACSigner/HMACVerifier 2026-08-17 23:38:42 -06:00
ab3013609a
chore(auth/jwt): enforce Signer/Verifier interfaces internally 2026-08-17 23:38:42 -06:00
20c7887bcd
test(auth): add AuthorizationSchemes tests (any-scheme, unaccepted scheme)
Add tests for AuthorizationSchemes ["*"] accepting any scheme and
for unaccepted schemes returning ErrNoCredentials without falling
through to cookies. These fill pre-existing test gaps unrelated to
the TokenCookies feature.
auth/v1.2.0
2026-08-17 23:15:24 -06:00
4b4a83b220
test(auth): add tests for BasicRequestAuthenticator including TokenCookies
Cover cookie extraction, priority ordering, empty value skipping,
error propagation, and existing gaps (Bearer any-scheme, unaccepted
scheme rejection, Basic Auth priority).
2026-08-17 23:15:18 -06:00