Skip to content

Releases: DefectingCat/lolly

v0.4.1

10 Jun 05:56

Choose a tag to compare

Fixed

  • stream: 修复上游选择逻辑,添加优雅关闭支持
  • stream: 修复 Stop 后 stopCh 未重置导致的重启问题

v0.4.0 - Least Time & Session Sticky Load Balancing

09 Jun 09:03

Choose a tag to compare

v0.4.0 - Least Time & Session Sticky Load Balancing

Added

Load Balancing

  • Least Time balancer: EWMA-based least response time algorithm, automatically selects the fastest upstream
  • Session Sticky balancer: Cookie-based session affinity with consistent hash sharding, supporting Cookie expiration, domain, path, Secure/HttpOnly/SameSite attributes
  • YAML configuration support: least_time, sticky strategies and parameters

Platform

  • FreeBSD deployment examples

Fixed

  • Least Time response time recording correction
  • Sticky Cookie format, shard key, and expiration check fixes
  • Sticky double-stop protection and restart support
  • Config validation: least_time default_time must not be negative

Tests

  • Least Time and Sticky balancer integration tests
  • Least Time and Sticky benchmarks

v0.3.0

05 Jun 06:25

Choose a tag to compare

Added

核心功能

  • Lua gjson 模块:JSON 编码/解码库,支持 sort_keys 选项
  • Lua 路由注册:支持 route 字段的 Lua 脚本按路由执行
  • Config include 指令:支持 glob 模式的配置文件拆分和包含
  • SIGHUP 热重载:配置变更后通过信号触发无中断重载
  • FreeBSD / OpenBSD 构建目标
  • X-Forwarded-Host 和 X-Forwarded-Proto 可配置代理头

平台与构建

  • MIT 许可证
  • docs/plans/ 添加到 .gitignore
  • Makefile 优化和一致性修复

Performance

  • matcher RadixTree 搜索 sync.Pool 零分配
  • loadbalance filterHealthy 池化 + atomic.Bool 重建锁
  • FileInfoCache 近似 LRU 替代读写锁升级
  • resolver O(1) LRU(container/list)
  • proxy 内联 FNV-1a 哈希、消除 WebSocket 字符串分配、缓存键单次遍历
  • compression MIME 预计算字节切片、GeoIP 查找去重、gzip_static 预建扩展名集合
  • ConsistentHash 双锁消除、Balancer healthy slice 池化

Fixed

  • 修复 9 个包的并发数据竞争(go test -count=3 -race 零 race)
    • lua: TCPSocket.currentOp 锁保护、schedulerMu 调度器同步
    • server: buildMiddlewareChain 并发写、multi-server 模式 goroutine 安全
    • handler/app/http3/stream: 测试同步和原子操作修复
  • 多服务器模式 status/pprof 注册
  • config include 循环检测
  • atomic.Bool 替代 running 标志消除 data race
  • OCSP 刷新逻辑、DNS resolver double-close panic
  • SSL DER 提取改用 encoding/pem
  • 根路径规范化修复

Changed

  • 删除 ~16.8k 行死代码(disk_cache、tiered_cache、tempfile、upgrade、lua mock engine 等)
  • 提取公共函数到 testutil/netutil/utils
  • 合并冗余 switch、移除 50+ 子目录 AGENTS.md
  • fasthttp 升级至 1.71.0,compress 升级至 1.18.6

Tests

  • 安全中间件覆盖率 75.9% → 88.5%
  • 服务器模块覆盖率 78.6% → 83.3%
  • proxy 覆盖率 71.1% → 80%+
  • variable 覆盖率 74.5% → 85%+
  • http3 覆盖率 46% → 93.1%
  • sslutil 覆盖率 29.2% → 85%+
  • adapter 覆盖率 0% → 80%+
  • stream 覆盖率 57% → 75%+

Build

  • 删除 GitHub Actions workflow 文件
  • 添加 docs/skills/release.md 发布流程技能

v0.2.2

30 Apr 09:01

Choose a tag to compare

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 Cachestale_if_error and stale_if_timeout cache 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.Pool pointer wrapping to eliminate boxing allocations
  • FileEntry pooling to reduce GC pressure
  • RWMutex for FileInfoCache; cached ETag regeneration avoidance
  • Balancer healthy slice pooling
  • ConsistentHash and RateLimiter concurrency optimizations
  • Pre-compressed file existence caching
  • RWMutex-priority reads in cache Get with double-check upgrade

🏗️ Refactoring

  • Extracted CommonAdapter for HTTP/2/3 adapters
  • Extracted createFastServer, createProxyForConfig helpers
  • Extracted TLS config generation to sslutil
  • Unified IP whitelist parsing and Lua ngx table helpers
  • Modernized code with Go 1.22+ features
  • Eliminated goto statements 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