Repository navigation
v0.3.1
What's New in v0.3.1
This release includes all changes from v0.2.2 and v0.3.0.
Self-Contained Type Generation
- Eliminated external
caddy-json-typesdependency - types now generated directly from local Caddy Go source - Uses tygo (Go → TypeScript) + ts-to-zod (TypeScript → Zod)
- Generated TypeScript types across 16 modules (core, http, tls + 13 handler modules)
npm run generate:types/npm run sync:caddyto regenerate
100% Handler Schema Coverage (20/20)
All built-in Caddy handlers now have Zod schemas:
- Core:
ReverseProxyHandler,Headers,StaticResponse,Authentication,Rewrite,Encode,Subroute - File/template:
FileServer,Templates - Request manipulation:
Map,Push,RequestBody,Vars - Response handling:
Intercept,CopyResponse,CopyResponseHeaders,Error - Observability:
Tracing,LogAppend,Invoke KnownCaddyHandlerSchemadiscriminated union for strict validationCaddyHandlerSchemawith fallback for custom/plugin handlers
Config File Loading
loadConfig(path, adapter?, options?)- Load and adapt config files with auto-detectionloadCaddyfile(path, options?)- Convenience function for Caddyfile formatdetectAdapter(path)- Auto-detect adapter from file extension
New applyConfig() Method
- Apply full configuration to running Caddy via
/loadendpoint - Enables full workflow: load → modify → apply
API Response Validation with Zod
All client methods now validate responses at runtime:
getConfig(),getRoutes(),getServers(),getServerConfig(),getVersion(),getUpstreams(),adapt()
Consistent Error Handling
- All user-facing validation now throws
ValidationErrorinstead of rawZodError - Contextual error messages (e.g., "buildHostRoute options: dial: Invalid format")
CaddyApiErrorincludesurlandmethodfor debugging
MITMproxy Traffic Inspection Demo
- Interactive dashboard with real-time traffic interception toggle
- Elasticsearch debugging challenges (5 automated + 1 guided)
- Response manipulation challenges (theme hacking, feature flags, admin mode)
- Docker Compose stack with Caddy, Elasticsearch, MITMproxy
Full Changelog: v0.2.0...v0.3.1