|
|
d269940d8b
|
style: fix formatting issues
- Add missing newlines at end of files
- Fix indentation in ssl.go
- Remove extra blank lines
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-30 13:42:53 +08:00 |
|
|
|
91e04222b3
|
refactor: 统一 IP 白名单解析和 excludeSet 构建
Batch 1 重构:
- 新增 utils.ParseIPAllowList 统一 IP/CIDR 解析(含 localhost 特殊处理)
- pprof.go/status.go/purge.go 改用统一函数,减少 ~66 行重复代码
- 新增 loadbalance.buildExcludeSet 统一排除集合构建
- 更新 pprof_test.go 适配统一字段 allowed []net.IPNet
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-29 16:18:52 +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 |
|
|
|
31b3d4d0a3
|
test(sslutil,utils,version): 添加工具模块测试
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-21 08:12:34 +08:00 |
|
|
|
ae0bec6c3b
|
feat(internal): 实现 internal 指令
- 新增 IsInternalRedirect 检测内部重定向请求
- static handler 支持 internal 访问限制
- proxy handler 支持 internal 访问限制
- 支持 X-Accel-Redirect 内部重定向
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-20 18:09:06 +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 |
|
|
|
4053634b4c
|
style(utils): 对齐 HTTPError 变量声明格式
对齐预定义 HTTP 错误变量的等号位置,保持代码风格一致。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-13 11:25:56 +08:00 |
|
|
|
e1df0ec205
|
refactor(utils): 提取 HTTP 错误响应辅助函数
新增 SendError 和 SendErrorWithDetail 函数,统一处理 HTTP 错误响应,减少重复代码。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-13 11:12:49 +08:00 |
|