1. 09 Feb, 2026 1 commit
    • yangjianbo's avatar
      fix: 修复代码审核发现的安全和质量问题 · d7011163
      yangjianbo authored
      
      
      安全修复(P0):
      - 移除硬编码的 OAuth client_secret(Antigravity、Gemini CLI),
        改为通过环境变量注入(ANTIGRAVITY_OAUTH_CLIENT_SECRET、
        GEMINI_CLI_OAUTH_CLIENT_SECRET)
      - 新增 logredact.RedactText() 对非结构化文本做敏感信息脱敏,
        覆盖 GOCSPX-*/AIza* 令牌和常见 key=value 模式
      - 日志中不再打印 org_uuid、account_uuid、email_address 等敏感值
      
      安全修复(P1):
      - URL 验证增强:新增 ValidateHTTPURL 统一入口,支持 allowlist 和
        私网地址阻断(localhost/内网 IP)
      - 代理回退安全:代理初始化失败时默认阻止直连回退,防止 IP 泄露,
        可通过 security.proxy_fallback.allow_direct_on_error 显式开启
      - Gemini OAuth 配置校验:client_id 与 client_secret 必须同时
        设置或同时留空
      
      其他改进:
      - 新增 tools/secret_scan.py 密钥扫描工具和 Makefile secret-scan 目标
      - 更新所有 docker-compose 和部署配置,传递 OAuth secret 环境变量
      - google_one OAuth 类型使用固定 redirectURI,与 code_assist 对齐
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      d7011163
  2. 07 Feb, 2026 1 commit
    • erio's avatar
      feat(antigravity): comprehensive enhancements - model mapping, rate limiting, scheduling & ops · 5e98445b
      erio authored
      Key changes:
      - Upgrade model mapping: Opus 4.5 → Opus 4.6-thinking with precise matching
      - Unified rate limiting: scope-level → model-level with Redis snapshot sync
      - Load-balanced scheduling by call count with smart retry mechanism
      - Force cache billing support
      - Model identity injection in prompts with leak prevention
      - Thinking mode auto-handling (max_tokens/budget_tokens fix)
      - Frontend: whitelist mode toggle, model mapping validation, status indicators
      - Gemini session fallback with Redis Trie O(L) matching
      - Ops: enhanced concurrency monitoring, account availability, retry logic
      - Migration scripts: 049-051 for model mapping unification
      5e98445b
  3. 07 Jan, 2026 1 commit
  4. 03 Jan, 2026 1 commit
    • yangjianbo's avatar
      fix(安全): 修复上游校验与 URL 清理问题 · 25e16326
      yangjianbo authored
      增加请求阶段 DNS 解析校验,阻断重绑定到私网
      补充默认透传 WWW-Authenticate 头,保留认证挑战
      前端相对 URL 过滤拒绝 // 协议相对路径
      
      测试: go test ./internal/repository -run TestGitHubReleaseServiceSuite
      测试: go test ./internal/repository -run TestTurnstileServiceSuite
      测试: go test ./internal/repository -run TestProxyProbeServiceSuite
      测试: go test ./internal/repository -run TestClaudeUsageServiceSuite
      25e16326
  5. 31 Dec, 2025 1 commit
    • yangjianbo's avatar
      perf(后端): 完成性能优化与连接池配置 · 7efa8b54
      yangjianbo authored
      新增 DB/Redis 连接池配置与校验,并补充单测
      
      网关请求体大小限制与 413 处理
      
      HTTP/req 客户端池化并调整上游连接池默认值
      
      并发槽位改为 ZSET+Lua 与指数退避
      
      用量统计改 SQL 聚合并新增索引迁移
      
      计费缓存写入改工作池并补测试/基准
      
      测试: 在 backend/ 下运行 go test ./...
      7efa8b54
  6. 24 Dec, 2025 1 commit
  7. 20 Dec, 2025 2 commits
    • NepetaLemon's avatar
      ci(backend): 添加 github actions (#10) · c6b3de11
      NepetaLemon authored
      ## 变更内容
      
      ### CI/CD
      - 添加 GitHub Actions 工作流(test + golangci-lint)
      - 添加 golangci-lint 配置,启用 errcheck/govet/staticcheck/unused/depguard
      - 通过 depguard 强制 service 层不能直接导入 repository
      
      ### 错误处理修复
      - 修复 CSV 写入、SSE 流式输出、随机数生成等未处理的错误
      - GenerateRedeemCode() 现在返回 error
      
      ### 资源泄露修复
      - 统一使用 defer func() { _ = xxx.Close() }() 模式
      
      ### 代码清理
      - 移除未使用的常量
      - 简化 nil map 检查
      - 统一代码格式
      c6b3de11
    • Forest's avatar
      refactor(backend): service http ports · cceada7d
      Forest authored
      cceada7d