|
|
6f17bbad7e
|
chore: remove trailing blank lines and clean up whitespace
|
2026-06-03 18:08:34 +08:00 |
|
|
|
2734b04d8f
|
refactor: remove 16.8k lines of dead code across all internal packages
- Delete unused files: tempfile subsystem, matcher variants, server/internal
- Remove 200+ unused functions across proxy, ssl, lua, http2/3, stream, variable
- Fix proxy test type errors (backgroundRefresh ctx→Request)
- Move bench/tools mock backend into internal/testutil
- Remove corresponding test functions for all deleted code
|
2026-06-03 16:15:43 +08:00 |
|
|
|
4678cb5483
|
refactor: use testutil helpers in server tests
|
2026-06-03 14:19:22 +08:00 |
|
|
|
cf2fcca7e8
|
refactor: 提取公共逻辑、消除重复代码、加强错误处理
- 提取 App 公共逻辑到 app_common.go,消除 app.go/app_windows.go 重复定义
- 提取 Server 生命周期/中间件/路由逻辑到独立文件(lifecycle.go/middleware_builder.go/router.go)
- 提取 Proxy 缓存处理/头部修改/目标选择到独立模块
- 提取 CheckIPAccess/CheckTokenAuth 到 utils/httperror.go,消除 status/purge 重复实现
- 修复 stream 双向转发:任一方向完成立即关闭双端,避免连接泄漏
- 修复 SSL/TLS 中静默忽略错误的问题,添加日志记录
- 统一日志消息为英文
💘 Generated with Crush
Assisted-by: GLM 5.1 via Crush <crush@charm.land>
|
2026-04-28 18:00:48 +08:00 |
|
|
|
6f6a8f0455
|
refactor(adapter): 提取 HTTP/2/3 适配器公共逻辑为 CommonAdapter
将 http2 和 http3 适配器中重复的 sync.Pool 管理、流式请求体处理、
上下文重置等逻辑提取到 internal/adapter 包,通过 struct embedding 复用。
同时简化 ConnLimiter 直接实现 middleware.Middleware 接口,移除冗余 wrapper。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-28 17:06:41 +08:00 |
|
|
|
9f7090df67
|
test(handler,middleware,server,ssl,proxy): 扩展测试覆盖率
- handler: 添加 sendfile 和 static 处理器测试
- middleware/security: 添加访问控制、认证、请求头、限流测试
- server: 添加池、pprof、清理、状态、升级、vhost 测试
- ssl: 添加客户端验证、OCSP、SSL 测试
- proxy: 添加代理覆盖率补充测试
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-22 10:42:05 +08:00 |
|
|
|
7a96db9f05
|
test(server): 重构并扩展服务器测试
- 拆分 server_extended_test.go 到独立测试文件
- 添加 pprof、purge、vhost、internal 测试
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-21 08:12:33 +08:00 |
|
|
|
05a414d1bb
|
feat(server): 添加 Purge 测试导出方法和安全检查
- purgeByPath/purgeByPattern 添加 nil server 检查
- 导出 PurgeByPathForTest/PurgeByPatternForTest 用于测试
- 添加 purge.go 全面单元测试覆盖
- 添加 cache purge 测试验证缓存清理功能
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-16 18:12:16 +08:00 |
|
|
|
bec8932561
|
feat(server): 添加缓存清理 API 支持
新增 PurgeHandler 处理器,支持:
- 按精确路径和通配符模式清理缓存
- HTTP 方法过滤(默认 GET)
- IP 白名单访问控制(CIDR/单 IP/localhost)
- Token 认证保护
- 三种启动模式路由注册
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-16 16:47:10 +08:00 |
|