d21e27fbac
fix(lint): 修复 golangci-lint 错误 (119 -> 0 issues)
...
主要修复:
- errcheck: defer Close 使用 //nolint:errcheck,类型断言改为 ok 检查
- govet fieldalignment: 调整结构体字段顺序优化内存布局
- revive unused-parameter: 将未使用参数改为 _
- exhaustive: 添加缺失的 switch case 或 default
- goconst: 提取重复字符串为常量 (accessAllow, accessDeny 等)
- staticcheck SA9003: 修复空分支逻辑
- gofmt: 运行 gofmt -w 格式化
- nolintlint: 修复 nolint 注释格式
其他改进:
- 更新 .golangci.yml 配置,启用更严格的检查
- 移除未使用的代码和导入
- 简化测试辅助函数调用
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 16:15:31 +08:00
8b382606df
Merge branch 'lint-fix' - resolve sendfile.go conflict
...
Conflict: sendfile.go (!linux build tag) was incorrectly modified to
include linuxSendfile and getSocketFd functions which already exist
in sendfile_linux.go.
Resolution: Keep HEAD version (simple fallback returning ENOTSUP) as
Linux implementation is properly separated in sendfile_linux.go.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 09:26:48 +08:00
d89e55481c
refactor(ssl): 适配 resolver.DNSCacheEntry 重命名
...
适配 resolver 模块类型重命名
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 09:40:48 +08:00
9d49349ee1
feat(ssl,config): 新增 Session Tickets 和 mTLS 客户端证书验证
...
- SessionTicketsConfig 支持 TLS 1.3 会话恢复,密钥轮换和持久化
- ClientVerifyConfig 支持双向 TLS 认证,CA 证书池和 CRL
- TLSManager 集成 SessionTicketManager 和 ClientVerifier
- 新增完整测试覆盖密钥轮换和客户端验证逻辑
Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-08 14:36:47 +08:00