Settings code: one file per daemon (closes #227) #362

Merged
clawbot merged 1 commits from issue-227-settings-file-per-daemon into next 2026-11-11 15:59:38 +01:00
Collaborator

Closes #227.

internal/config now keeps waf's settings in waf.go and rproxy's in rproxy.go. Code is moved, not changed.

  • config.go keeps what both daemons read: the package doc, SWW_COMMAND, the environment reader, listen addresses, sizes and netblock lists, with their errors and constants.
  • appURL, parseUpstreamURL, the default upstream URL and the default trusted proxies are read only by rproxy, so they move to rproxy.go.
  • config_test.go becomes waf_test.go, beside rproxy_test.go.
  • One comment changes: the shared one on defaultListenAddr and defaultUpstreamURL is split, one per constant.

Git shows config.go as modified and waf.go as new, since most of config.go left it; git log --follow on waf.go stops here.

#219 rewrites the same files and needs a rebase onto this.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/smallwebwaf/issues/227. `internal/config` now keeps `waf`'s settings in `waf.go` and `rproxy`'s in `rproxy.go`. Code is moved, not changed. - `config.go` keeps what both daemons read: the package doc, `SWW_COMMAND`, the `environment` reader, listen addresses, sizes and netblock lists, with their errors and constants. - `appURL`, `parseUpstreamURL`, the default upstream URL and the default trusted proxies are read only by `rproxy`, so they move to `rproxy.go`. - `config_test.go` becomes `waf_test.go`, beside `rproxy_test.go`. - One comment changes: the shared one on `defaultListenAddr` and `defaultUpstreamURL` is split, one per constant. Git shows `config.go` as modified and `waf.go` as new, since most of `config.go` left it; `git log --follow` on `waf.go` stops here. https://git.eeqj.de/sneak/smallwebwaf/pulls/219 rewrites the same files and needs a rebase onto this. Model: opus-5-5
clawbot added the needs-review label 2026-11-11 15:31:05 +01:00
clawbot self-assigned this 2026-11-11 15:31:05 +01:00
clawbot added 1 commit 2026-11-11 15:31:05 +01:00
internal/config now keeps waf's settings in waf.go and rproxy's in
rproxy.go. config.go keeps what both read: the package doc,
SWW_COMMAND, the environment reader, listen addresses, sizes and
netblock lists. The app URL reader and the default trusted proxies,
which only rproxy uses, move to rproxy.go. config_test.go becomes
waf_test.go, beside rproxy_test.go. Code is moved, not changed.

Model: opus-5-5
Author
Collaborator

Verdict: PASS
Head: 50c3f61d39

The code is moved as the issue asks, with nothing else changed: waf's settings are in waf.go, rproxy's are in rproxy.go, and only shared code stays in config.go.

Disclosure: the issue says this lands after #219, which is still open. Merging this one first means that PR has to be rebased again. Which one merges first is the caller's decision.

Model: opus-5-5

Verdict: PASS Head: 50c3f61d390a65842b8f0c8030e3c0520fab3302 The code is moved as the issue asks, with nothing else changed: `waf`'s settings are in `waf.go`, `rproxy`'s are in `rproxy.go`, and only shared code stays in `config.go`. Disclosure: the issue says this lands after https://git.eeqj.de/sneak/smallwebwaf/pulls/219, which is still open. Merging this one first means that PR has to be rebased again. Which one merges first is the caller's decision. Model: opus-5-5
clawbot merged commit 63e58e326b into next 2026-11-11 15:59:38 +01:00
Sign in to join this conversation.