The first part of the third stage of the build order in SPEC.md: the AS number and country looked up for every client, as "Lookup of AS number and country" and "Data flow for one request" give it. Today next asks GeoJS only while a country list is set, and reads no AS number. The IPinfo Lite file (#22) and the lower limits for listed AS numbers and countries (#21) build on this. One PR to next.
SWWAF_LOOKUP_SOURCE (default geojs, or off; file comes with #22). With geojs, every new visitor's address is asked about, private, loopback and link-local addresses never; off asks nothing, and a country list set with off stops the start naming both.
Each answer's asn and organization_name read beside country_code; 64512 counts as unknown. Kept in memory and in lookups.json as the country is now.
A request waits for its client's first answer, up to SWWAF_LOOKUP_TIMEOUT, only when a setting needs it (a country list, or SWWAF_ADD_LOOKUP_HEADERS); otherwise it goes on at once and the answer reaches the client's history and ban notes when it comes.
asn and as_name filled in the request log, the client's history, ban notes and alerts; the metrics' requests and bytes by AS number and by country, as "Metrics endpoint" gives them.
SWWAF_ADD_LOOKUP_HEADERS (default false): X-Client-ASN and X-Client-Country passed to the app, and any such headers a client sent removed.
README.md says plainly that GeoJS is now told every new visitor's address unless SWWAF_LOOKUP_SOURCE=off.
Definition of done: tests, against a local stand-in for GeoJS and on a clock the test controls, show every visitor asked about with no setting needing it, no request waiting then, the AS number and name in each place above, 64512 as unknown, off asking nothing and refusing a country list, and the headers passed and a client's own removed; each test failing with its rule broken; make check green; one PR to next, passed by a reviewer who did not write it.
Model: opus-5-5
The first part of the third stage of the build order in `SPEC.md`: the AS number and country looked up for every client, as "Lookup of AS number and country" and "Data flow for one request" give it. Today `next` asks GeoJS only while a country list is set, and reads no AS number. The IPinfo Lite file (https://git.eeqj.de/sneak/smallwebwaf/issues/22) and the lower limits for listed AS numbers and countries (https://git.eeqj.de/sneak/smallwebwaf/issues/21) build on this. One PR to `next`.
- `SWWAF_LOOKUP_SOURCE` (default `geojs`, or `off`; `file` comes with https://git.eeqj.de/sneak/smallwebwaf/issues/22). With `geojs`, every new visitor's address is asked about, private, loopback and link-local addresses never; `off` asks nothing, and a country list set with `off` stops the start naming both.
- Each answer's `asn` and `organization_name` read beside `country_code`; `64512` counts as unknown. Kept in memory and in `lookups.json` as the country is now.
- A request waits for its client's first answer, up to `SWWAF_LOOKUP_TIMEOUT`, only when a setting needs it (a country list, or `SWWAF_ADD_LOOKUP_HEADERS`); otherwise it goes on at once and the answer reaches the client's history and ban notes when it comes.
- `asn` and `as_name` filled in the request log, the client's history, ban notes and alerts; the metrics' requests and bytes by AS number and by country, as "Metrics endpoint" gives them.
- `SWWAF_ADD_LOOKUP_HEADERS` (default `false`): `X-Client-ASN` and `X-Client-Country` passed to the app, and any such headers a client sent removed.
- `README.md` says plainly that GeoJS is now told every new visitor's address unless `SWWAF_LOOKUP_SOURCE=off`.
Definition of done: tests, against a local stand-in for GeoJS and on a clock the test controls, show every visitor asked about with no setting needing it, no request waiting then, the AS number and name in each place above, `64512` as unknown, `off` asking nothing and refusing a country list, and the headers passed and a client's own removed; each test failing with its rule broken; `make check` green; one PR to `next`, passed by a reviewer who did not write it.
Model: opus-5-5
clawbot
self-assigned this 2026-10-07 05:55:25 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The first part of the third stage of the build order in
SPEC.md: the AS number and country looked up for every client, as "Lookup of AS number and country" and "Data flow for one request" give it. Todaynextasks GeoJS only while a country list is set, and reads no AS number. The IPinfo Lite file (#22) and the lower limits for listed AS numbers and countries (#21) build on this. One PR tonext.SWWAF_LOOKUP_SOURCE(defaultgeojs, oroff;filecomes with #22). Withgeojs, every new visitor's address is asked about, private, loopback and link-local addresses never;offasks nothing, and a country list set withoffstops the start naming both.asnandorganization_nameread besidecountry_code;64512counts as unknown. Kept in memory and inlookups.jsonas the country is now.SWWAF_LOOKUP_TIMEOUT, only when a setting needs it (a country list, orSWWAF_ADD_LOOKUP_HEADERS); otherwise it goes on at once and the answer reaches the client's history and ban notes when it comes.asnandas_namefilled in the request log, the client's history, ban notes and alerts; the metrics' requests and bytes by AS number and by country, as "Metrics endpoint" gives them.SWWAF_ADD_LOOKUP_HEADERS(defaultfalse):X-Client-ASNandX-Client-Countrypassed to the app, and any such headers a client sent removed.README.mdsays plainly that GeoJS is now told every new visitor's address unlessSWWAF_LOOKUP_SOURCE=off.Definition of done: tests, against a local stand-in for GeoJS and on a clock the test controls, show every visitor asked about with no setting needing it, no request waiting then, the AS number and name in each place above,
64512as unknown,offasking nothing and refusing a country list, and the headers passed and a client's own removed; each test failing with its rule broken;make checkgreen; one PR tonext, passed by a reviewer who did not write it.Model: opus-5-5
Built in #97, waiting for review.
Model: opus-5-5