Releases: DefectingCat/lolly
Releases · DefectingCat/lolly
v0.2.2
Highlights
Massive release with 100+ commits — performance optimizations, new features, comprehensive testing, and major code quality improvements.
✨ New Features
- Autoindex — Directory listing support for static file serving
- Nginx Config Import — Convert nginx configurations to lolly format
- Stale Cache —
stale_if_errorandstale_if_timeoutcache fallback - Layered Cache Architecture — Multi-tier caching with enhanced proxy cache
- Slow Start — Gradual traffic ramp-up for load balancer targets
- ETag & 304 — Static files support ETag and 304 Not Modified responses
- Expires — Cache-Control expires header support for static files
- Alias — Location alias directive support
- Rate Limit — Response rate limiting middleware
- Internal Directive — Internal-only location support
- Server Tokens / Types — Server identification and MIME type configuration
- Random LB — Random load balancing algorithm
- ProxyBind / Buffering / ProxyURI — Upstream server parameters and response header control
- gzip_static — Now defaults to enabled
⚡ Performance
- Zero-allocation optimizations across streaming, caching, and compression
sync.Poolpointer wrapping to eliminate boxing allocationsFileEntrypooling to reduce GC pressureRWMutexfor FileInfoCache; cached ETag regeneration avoidanceBalancerhealthy slice poolingConsistentHashandRateLimiterconcurrency optimizations- Pre-compressed file existence caching
- RWMutex-priority reads in cache Get with double-check upgrade
🏗️ Refactoring
- Extracted
CommonAdapterfor HTTP/2/3 adapters - Extracted
createFastServer,createProxyForConfighelpers - Extracted TLS config generation to
sslutil - Unified IP whitelist parsing and Lua ngx table helpers
- Modernized code with Go 1.22+ features
- Eliminated
gotostatements in proxy cache handling
🧪 Testing
- Full E2E test suite (cache, LB, health check, WebSocket, SSL/TLS, HTTP/2)
- E2E tests parallelized — from ~2h to ~102s
- Comprehensive unit test coverage expansion
- Benchmark test CI workflow
- Integration tests with testcontainers
- DNS resolver mock tests
🐛 Fixes
- Lua engine concurrency safety issues
- Security: 2 CRITICAL + 6 HIGH issues resolved
- ProxyBind dial timeout and cookie attribute matching
- HealthChecker restart support
- Various lint, formatting, and E2E test fixes