Skip to content

Replace embedded config builder with external wafsrv-builder - #5

Merged
sergeyfast merged 1 commit into
masterfrom
external-config-builder-v0.0.5
Jul 26, 2026
Merged

Replace embedded config builder with external wafsrv-builder#5
sergeyfast merged 1 commit into
masterfrom
external-config-builder-v0.0.5

Conversation

@sergeyfast

Copy link
Copy Markdown
Member

Summary

  • Remove the embedded /builder/ UI (internal/dashboard/web/builder/, −2700 LOC); the dashboard footer now opens https://vmkteam.github.io/wafsrv-builder/ passing the running config via a base64url URL hash
  • Add GET /config.toml on the management port: exports the running config with secrets blanked via new Config.Redacted() (captcha Secret/SecretKey, signing secrets, webhook URLs)
  • Restore per-country captcha/log actions in the IP middleware: IP.Countries.Captcha adds +5 WAFScore and defers to the decision engine, IP.Countries.Log records only; priority block > captcha > log
  • Re-raise http.ErrAbortHandler in accessLog panic recovery so client disconnects mid-proxy abort quietly instead of being logged as panics; metrics and access log still run during unwinding
  • Link the external Config Builder in README

Test plan

  • go build ./...
  • go test -short ./internal/app/... ./internal/waf/ip/... ./internal/waf/proxy/... — pass
  • New tests: config redaction (config_test.go), country captcha/log actions (service_test.go), ErrAbortHandler re-panic (middleware_test.go)

- Remove the embedded /builder/ UI (internal/dashboard/web/builder/);
  the dashboard footer now opens https://vmkteam.github.io/wafsrv-builder/
  passing the running config via a base64url URL hash
- Add GET /config.toml on the management port: exports the running
  config with secrets blanked via new Config.Redacted() (captcha
  Secret/SecretKey, signing secrets, webhook URLs)
- Restore per-country captcha/log actions in the IP middleware:
  IP.Countries.Captcha adds +5 WAFScore and defers to the decision
  engine, IP.Countries.Log records only; priority block > captcha > log
- Re-raise http.ErrAbortHandler in accessLog panic recovery so client
  disconnects mid-proxy abort quietly instead of being logged as
  panics; metrics and access log still run during unwinding
- Link the external Config Builder in README
@sergeyfast
sergeyfast merged commit ee85bda into master Jul 26, 2026
2 checks passed
@sergeyfast
sergeyfast deleted the external-config-builder-v0.0.5 branch July 26, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant