Rename discriminator to waf everywhere (closes #312)
check / check (push) Successful in 5m58s

The command is now `sww waf`, and the package is `internal/waf`. Types,
functions, files, tests, comments, docs, the Dockerfile, the runit
script, `script/`, compose examples, the log field `waf_line` and the
`X-From-Waf` test header follow. No behaviour changes, and no setting
changes name: rproxy already finds the waf through `SWRP_WAF_BACKEND`.

Done with one `sed -i` (Discriminator and DISCRIMINATOR to WAF,
discriminator to waf) over the files `git grep -i discriminator`
listed, as sneak allowed for this rename, then `git mv` for the
package and files. By hand afterwards: the header's spelling, which
the linter requires, and the padding after `waf` in `sww`'s usage
text.

Model: opus-5-5
This commit was merged in pull request #319.
This commit is contained in:
clawbot committed 2026-11-11 02:43:16 +01:00
1 parent ad36dd1775
commit f7e3190654
89 files changed
+1454 -1489

No files matched your search

+2 -2
View File
@@ -92,7 +92,7 @@ type History struct {
ASName string `json:"as_name,omitempty"`
Country string `json:"country,omitempty"`
LookedUp time.Time `json:"looked_up,omitzero"`
// Requests are all the client's requests: Forwarded those discriminator allowed,
// Requests are all the client's requests: Forwarded those waf allowed,
// Refused those it refused, and neither those for a path under
// /_sww/.
Requests int64 `json:"requests"`
@@ -136,7 +136,7 @@ type Offences struct {
// Request is what a client's history keeps of one of its requests.
type Request struct {
// Forwarded is true for a request discriminator allowed, and Refused for one it
// Forwarded is true for a request waf allowed, and Refused for one it
// refused. Both are false for a request for a path under /_sww/.
Forwarded bool
Refused bool