22 Commits

Author SHA1 Message Date
99819b70ff added caddy-proxy-manager for testing
Some checks failed
Build and Push Docker Images (Trusted) / build-and-push (., docker/caddy/Dockerfile, caddy) (push) Has been cancelled
Build and Push Docker Images (Trusted) / build-and-push (., docker/l4-port-manager/Dockerfile, l4-port-manager) (push) Has been cancelled
Build and Push Docker Images (Trusted) / build-and-push (., docker/web/Dockerfile, web) (push) Has been cancelled
Tests / test (push) Has been cancelled
2026-04-21 22:49:08 +00:00
fuomag9
5c78a8e8f6 Add IONOS DNS provider
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 18:09:12 +02:00
fuomag9
2c70f2859a Add multi-provider DNS registry for ACME DNS-01 challenges
Replace hardcoded Cloudflare DNS-01 with a data-driven provider registry
supporting 11 providers (Cloudflare, Route 53, DigitalOcean, Duck DNS,
Hetzner, Vultr, Porkbun, GoDaddy, Namecheap, OVH, Linode). Users can
configure multiple providers with encrypted credentials and select a
default. Per-certificate provider override is supported via providerOptions.

- Add src/lib/dns-providers.ts with provider definitions, credential
  encrypt/decrypt, and Caddy config builder
- Change DnsProviderSettings to multi-provider format with default selection
- Auto-migrate legacy Cloudflare settings on startup (db.ts)
- Normalize old single-provider format on read (getDnsProviderSettings)
- Refactor buildTlsAutomation() to use provider registry
- Add GET /api/v1/dns-providers endpoint for provider discovery
- Add dns-provider settings group to REST API and instance sync
- Replace Cloudflare settings card with multi-provider UI (add/remove
  providers, set default, dynamic credential forms)
- Add 10 DNS provider modules to Caddy Dockerfile
- Update OpenAPI spec, E2E tests, and unit test mocks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 18:01:16 +02:00
fuomag9
5d0b4837d8 Security hardening: fix SQL injection, WAF bypass, placeholder injection, and more
- C1: Replace all ClickHouse string interpolation with parameterized queries
  (query_params) to eliminate SQL injection in analytics endpoints
- C3: Strip Caddy placeholder patterns from redirect rules, protected paths,
  and Authentik auth endpoint to prevent config injection
- C4: Replace WAF custom directive blocklist with allowlist approach — only
  SecRule/SecAction/SecMarker/SecDefaultAction permitted; block ctl:ruleEngine
  and Include directives
- H2: Validate GCM authentication tag is exactly 16 bytes before decryption
- H3: Validate forward auth redirect URIs (scheme, no credentials) to prevent
  open redirects
- H4: Switch 11 analytics/WAF/geoip endpoints from session-only requireAdmin
  to requireApiAdmin supporting both Bearer token and session auth
- H5: Add input validation for instance-mode (whitelist) and sync-token
  (32-char minimum) in settings API
- M1: Add non-root user to l4-port-manager Dockerfile
- M5: Document Caddy admin API binding security rationale
- Document C2 (custom config injection) and H1 (SSRF via upstreams) as
  intentional admin features

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 12:13:50 +02:00
fuomag9
0dad675c6d feat: integrate Coraza WAF with full UI and event logging
- Add coraza-caddy/v2 to Caddy Docker build
- Add waf_events + waf_log_parse_state DB tables (migration 0010)
- Add WafSettings type and get/save functions to settings
- Add WafHostConfig/WafMode types to proxy-hosts model
- Add resolveEffectiveWaf + buildWafHandler to caddy config generation
- Create waf-log-parser.ts: parse Coraza JSON audit log → waf_events
- Add WafFields.tsx per-host WAF UI (accordion, mode, CRS, directives)
- Add global WAF settings card to SettingsClient
- Add WAF Events dashboard page with search, pagination, severity chips
- Add WAF Events nav link to sidebar

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 22:16:34 +01:00
fuomag9
9254d8e910 fix: use node:http for Caddy admin API calls to avoid Sec-Fetch-Mode CORS triggering 2026-02-23 23:49:05 +01:00
fuomag9
4fac5e4d50 fix: remove --resume so Caddy always starts from Caddyfile with correct admin origins 2026-02-23 23:43:28 +01:00
fuomag9
1cfdaa061c fix: allow web container to reach Caddy admin API by adding origins 2026-02-23 21:43:50 +01:00
fuomag9
35471ec98c fix: use GOPROXY=direct in xcaddy build to bypass module proxy cache 2026-02-23 20:44:24 +01:00
fuomag9
e45507fcd7 feat: add caddy-blocker-plugin to Caddy Docker image 2026-02-23 19:56:36 +01:00
dependabot[bot]
9a6c192e25 docker: bump golang from 1.25 to 1.26 in /docker/caddy
Bumps golang from 1.25 to 1.26.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: '1.26'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-16 04:45:57 +00:00
fuomag9
a2512ffb8c implemented rootless image and running 2025-12-28 20:19:46 +01:00
fuomag9
58ec7e321e undo loki stuff 2025-11-12 23:22:30 +01:00
fuomag9
ec580d2385 Add the ability to log to loki 2025-11-12 22:07:51 +01:00
fuomag9
52f73e5ca7 1. First try to load from /config/caddy/autosave.json (the auto-saved config from the last run) 2. Fall back to /etc/caddy/Caddyfile only on first run when autosave doesn't exist 2025-11-11 21:39:19 +01:00
fuomag9
a95ecce935 Update Dockerfile 2025-11-11 19:39:15 +01:00
fuomag9
a5f6aed25d Update Dockerfile 2025-11-11 19:21:49 +01:00
fuomag9
c10808cf3b Update Dockerfile 2025-11-11 19:11:23 +01:00
fuomag9
76e31a3ea5 fix building 2025-11-11 19:05:43 +01:00
fuomag9
0ed2846133 switch caddy to ubuntu 2025-11-11 18:58:26 +01:00
fuomag9
f05b56bf02 Use HTTP for default site to prevent certificate errors on startup 2025-11-03 19:15:31 +01:00
fuomag9
315192fb54 first rewrite commit 2025-10-31 20:08:28 +01:00