7d2c71c921
chore(build): 配置 TMPDIR 避免 tmpfs 空间不足
...
- Makefile 设置 TMPDIR 为项目 tmp 目录
- 更新 docs/prompts.md 基准测试命令示例
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 14:57:12 +08:00
247fa81c00
fix(lua): 修复 Lua 引擎并发安全问题
...
- 缓存 coroutine.yield/status 函数,避免并发读取全局 Lua 状态机
- 添加 ngxRegisterMu 锁保护共享 ngx 表的并发写入
- 各 API 注册函数检查字段是否已存在,避免重复写入
- TCPSocket.currentOp 字段添加锁保护
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 14:19:11 +08:00
11e22c80b8
perf: 零分配优化与 Dial timeout 支持
...
- 添加 b2s/s2b 零分配字节-字符串转换工具函数
- WebSocket 数据转发使用 sync.Pool 复用 32KB buffer
- 条件化 Debug 日志避免非 Debug 级别的字符串分配
- 缓存键哈希计算直接写入 []byte 避免 string 转换
- 使用 bytes.EqualFold 替代 strings.ToLower 进行大小写不敏感比较
- generateETag 使用 strconv.AppendInt 避免 fmt.Sprintf
- 支持 Dial timeout 配置,区分 TCP 连接建立和总连接超时
- MaxConnsPerHost 默认值改为 512(fasthttp 推荐)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 20:11:20 +08:00
ce2d11197a
test(loadbalance,proxy): 添加上游参数和 random 算法测试
...
新增 IsAvailable/RecordFailure/RecordSuccess/filterHealthy 备份优先级、
Random 负载均衡算法测试,适配 createHostClient 签名变更。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 11:28:59 +08:00
6d33b9548f
docs: 添加 nginx core 模块功能分析提示
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 16:04:46 +08:00
89df85a5f4
docs(prompts): 简化任务列表,移除已完成项目
...
移除已完成的文档分析和优化任务,更新路径引用以匹配新的目录结构
(docs/nginx/ 和 lib/fasthttp/)。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 10:48:23 +08:00
0a332e8cef
docs(prompts): 添加 fasthttp 源码分析任务
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 09:54:24 +08:00
fd4e164ae6
refactor(security): 滑动窗口限流器使用分段锁优化并发性能
...
将单一 counters map + 全局 mutex 改为 16 buckets 分段锁结构:
- 新增 limiterBucket 结构体,每个桶独立持有 RW 锁和计数器 map
- 使用 FNV-1a 哈希算法将键均匀分布到 16 个桶中
- 各方法修改为按 bucket 分发操作:
- Allow() / allowApproximate() / allowPrecise()
- Reset() / ResetAll() / Cleanup()
- GetStats() / GetCount()
收益:
- 并发场景下锁竞争降低约 94% (16 个桶并行)
- 基准测试显示并行 Allow 操作约 89ns/op
测试验证:
- go test -race 通过并发安全测试
- 基准测试显示吞吐提升
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 14:26:01 +08:00
d687897090
docs: 更新 README 文档,添加 GeoIP 和 Lua 功能说明
...
- 新增 GeoIP 过滤功能介绍和配置示例
- 新增 Lua 脚本扩展功能介绍和配置示例
- 更新负载均衡算法说明,添加虚拟节点默认值
- 扩展安全功能说明,添加 trusted_proxies、auth_request 等
- 补充性能优化细节(sendfile 阈值、cache_lock)
- 更新 docs/prompts.md 提示词文档
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 16:19:34 +08:00
4f6a7be44c
docs: 更新 AGENTS.md 项目文档
...
- 更新各目录 AGENTS.md 的子目录信息
- 添加新增目录的 AGENTS.md 文件
- 更新 docs/prompts.md 添加新的提示词
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 13:15:39 +08:00
392d0b3449
docs: 新增模块 AGENTS.md 文档,更新目录索引
...
- 新增 http2、integration、resolver、variable 模块 AGENTS.md
- 更新 internal/AGENTS.md 目录表,补充新模块条目
- 更新 docs/prompts.md 添加 generate-config 缺失项分析提示
- 同步更新日期戳至 2026-04-09
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 13:35:29 +08:00
a7dde660c7
docs: 更新提示词文档,完善 generate-config 分析提示
2026-04-09 13:15:14 +08:00
76213de082
docs: 新增提示词文档,使用 ultrawork 替代 /team
2026-04-09 12:19:22 +08:00
ae027b6218
docs: 移除过时的文档文件
...
清理 docs 目录下不再需要的文档内容。
Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-08 10:07:34 +08:00
9cae5ad8cf
chore(init): initialize project with nginx documentation
...
- Add Go module initialization (go 1.26)
- Add comprehensive NGINX documentation covering:
- Overview, installation, HTTP core module
- Proxy/load balancing, SSL/TLS, URL rewrite
- Compression/caching, logging/monitoring
- Security, TCP/UDP stream, mail proxy
- Performance tuning, Git commit guide
- Add standard Go .gitignore
Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-02 11:45:53 +08:00