56 Commits

Author SHA1 Message Date
xfy
b445bca96a feat(server): 实现基础 HTTP 服务器核心功能
使用 fasthttp 替代 net/http,实现 Phase 2 核心模块:
- HTTP 服务器:fasthttp.Server 配置超时和连接限制
- 路由系统:fasthttp/router 基于 radix tree 匹配
- 静态文件服务:安全检查、索引文件支持
- 日志系统:zerolog 结构化日志
- 中间件框架:链式组合接口
- 虚拟主机管理:按 Host 头选择处理器

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-02 15:23:54 +08:00
xfy
06e8d55ef5 test(config): 添加配置模块单元测试
- 添加 internal/app 包测试(版本显示、配置生成)
- 添加 internal/config 包测试(加载、保存、验证、默认值)
- 更新 docs/plan.md 日志系统设计(选用 zerolog)
- 更新 .gitignore 添加 coverage.html

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-02 14:40:56 +08:00
xfy
a265597d14 feat(config): 实现配置加载模块和 CLI 参数解析
- 添加 internal/config 包,包含配置结构定义、默认值和验证逻辑
- 实现 CLI 参数解析 (-c/--config, -v, --generate-config)
- 添加 yaml.v3 依赖用于配置文件解析
- 简化 plan.md 中的配置测试示例

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 14:07:08 +08:00
xfy
3fb259419b docs(plan): 格式化开发计划文档
- 调整列表格式和缩进
- 移除各阶段提交信息模板(冗余)
- 简化项目目录结构描述

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-02 13:26:55 +08:00
xfy
bdb774510f docs(plan): refine development plan with detailed implementation
- Add middleware framework as Phase 2 prerequisite
- Move basic logging system to Phase 2 for debugging support
- Add TLS security defaults (disable TLSv1.0/1.1, secure ciphers)
- Expand security headers (CSP, HSTS, Referrer-Policy, Permissions-Policy)
- Add cache lock mechanism to prevent cache stampede
- Detail performance optimization (sendfile, goroutine pool, buffer pool)
- Update dependency graph

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-02 13:16:22 +08:00
xfy
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