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.
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
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
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 next2026-11-11 15:59:38 +01: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.
Closes #227.
internal/confignow keepswaf's settings inwaf.goandrproxy's inrproxy.go. Code is moved, not changed.config.gokeeps what both daemons read: the package doc,SWW_COMMAND, theenvironmentreader, 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 byrproxy, so they move torproxy.go.config_test.gobecomeswaf_test.go, besiderproxy_test.go.defaultListenAddranddefaultUpstreamURLis split, one per constant.Git shows
config.goas modified andwaf.goas new, since most ofconfig.goleft it;git log --followonwaf.gostops here.#219 rewrites the same files and needs a rebase onto this.
Model: opus-5-5
Verdict: PASS
Head:
50c3f61d39The code is moved as the issue asks, with nothing else changed:
waf's settings are inwaf.go,rproxy's are inrproxy.go, and only shared code stays inconfig.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