"backend/internal/git@web.lueluesay.top:chenxi/sub2api.git" did not exist on "679b21a86c27ae1b008372f443d24057f557039a"
  1. 26 Jan, 2026 1 commit
    • shaw's avatar
      feat(auth): 实现 TOTP 双因素认证功能 · 1245f07a
      shaw authored
      新增功能:
      - 支持 Google Authenticator 等应用进行 TOTP 二次验证
      - 用户可在个人设置中启用/禁用 2FA
      - 登录时支持 TOTP 验证流程
      - 管理后台可全局开关 TOTP 功能
      
      安全增强:
      - TOTP 密钥使用 AES-256-GCM 加密存储
      - 添加 TOTP_ENCRYPTION_KEY 配置项,必须手动配置才能启用功能
      - 防止服务重启导致加密密钥变更使用户无法登录
      - 验证失败次数限制,防止暴力破解
      
      配置说明:
      - Docker 部署:在 .env 中设置 TOTP_ENCRYPTION_KEY
      - 非 Docker 部署:在 config.yaml 中设置 totp.encryption_key
      - 生成密钥命令:openssl rand -hex 32
      1245f07a
  2. 20 Jan, 2026 2 commits
  3. 18 Jan, 2026 2 commits
  4. 16 Jan, 2026 2 commits
    • yangjianbo's avatar
      perf(Caddy): 添加静态资源长期缓存配置 · 74a3c745
      yangjianbo authored
      
      
      - 为 /assets/* 设置 1 年缓存 + immutable 标记
      - 包含 logo.png 和 favicon.ico
      - 移除可能干扰缓存的 Pragma/Expires 头
      
      效果:
      - 浏览器缓存命中后不再发送请求
      - Cloudflare CDN 可正确缓存静态资源
      - 重复访问页面秒开
      Co-Authored-By: default avatarClaude Opus 4.5 <noreply@anthropic.com>
      74a3c745
    • yangjianbo's avatar
      feat(安全): 实现 CSP nonce 支持解决内联脚本安全问题 · c9f79dee
      yangjianbo authored
      
      
      - 添加 GenerateNonce() 生成加密安全的随机 nonce
      - SecurityHeaders 中间件为每个请求生成唯一 nonce
      - CSP 策略支持 __CSP_NONCE__ 占位符动态替换
      - embed_on.go 注入的内联脚本添加 nonce 属性
      - 添加 Cloudflare Insights 域名到 CSP 允许列表
      - 添加完整单元测试,覆盖率达到 89.8%
      
      解决的问题:
      - 内联脚本违反 CSP script-src 指令
      - Cloudflare Insights beacon.min.js 加载被阻止
      Co-Authored-By: default avatarClaude Opus 4.5 <noreply@anthropic.com>
      c9f79dee
  5. 15 Jan, 2026 1 commit
    • yangjianbo's avatar
      fix(认证): OAuth 401 直接标记错误状态 · a458e684
      yangjianbo authored
      - OAuth 401 清理缓存并设置错误状态
      
      - 移除 oauth_401_cooldown_minutes 配置及示例
      
      - 更新 401 相关单测
      
      破坏性变更: OAuth 401 不再临时不可调度,需手动恢复
      a458e684
  6. 14 Jan, 2026 1 commit
  7. 12 Jan, 2026 2 commits
  8. 11 Jan, 2026 6 commits
  9. 10 Jan, 2026 1 commit
  10. 09 Jan, 2026 7 commits
    • Song Siyu's avatar
      feat: antigravity 配额域限流 + SSE 上限 (#222) · 7d1fe818
      Song Siyu authored
      * fix: 添加 gemini-3-flash 前缀映射支持 gemini-3-flash-preview
      
      * feat(antigravity): 增强请求参数和注入 Antigravity 身份 system prompt
      
      * feat: antigravity 配额域限流
      
      * chore: 调整 SSE 单行上限到 25MB
      
      * chore: 提升 SSE 单行上限到 40MB
      7d1fe818
    • Edric.Li's avatar
      feat(api-key): 添加 IP 白名单/黑名单限制功能 (#221) · 0a4641c2
      Edric.Li authored
      * feat(api-key): add IP whitelist/blacklist restriction and usage log IP tracking
      
      - Add IP restriction feature for API keys (whitelist/blacklist with CIDR support)
      - Add IP address logging to usage logs (admin-only visibility)
      - Remove billing_type column from usage logs UI (redundant)
      - Use generic "Access denied" error message for security
      
      Backend:
      - New ip package with IP/CIDR validation and matching utilities
      - Database migrations for ip_whitelist, ip_blacklist (api_keys) and ip_address (usage_logs)
      - Middleware IP restriction check after API key validation
      - Input validation for IP/CIDR patterns on create/update
      
      Frontend:
      - API key form with enable toggle for IP restriction
      - Shield icon indicator in table for keys with IP restriction
      - Removed billing_type filter and column from usage views
      
      * fix: update API contract tests for ip_whitelist/ip_blacklist fields
      
      Add ip_whitelist and ip_blacklist fields to expected JSON responses
      in API contract tests to match the new API key schema.
      0a4641c2
    • Edric Li's avatar
      fix: update API contract tests for ip_whitelist/ip_blacklist fields · e83f644c
      Edric Li authored
      Add ip_whitelist and ip_blacklist fields to expected JSON responses
      in API contract tests to match the new API key schema.
      e83f644c
    • song's avatar
      chore: 提升 SSE 单行上限到 40MB · c2a6ca8d
      song authored
      c2a6ca8d
    • song's avatar
      chore: 调整 SSE 单行上限到 25MB · 7b1cf2c4
      song authored
      7b1cf2c4
    • admin's avatar
      feat(auth): 添加 Linux DO Connect OAuth 登录支持 · 152d0cde
      admin authored
      - 新增 Linux DO OAuth 配置项和环境变量支持
      - 实现 OAuth 授权流程和回调处理
      - 前端添加 Linux DO 登录按钮和回调页面
      - 支持通过 Linux DO 账号注册/登录
      - 添加相关国际化文本
      
      🤖 Generated with [Claude Code](https://claude.com/claude-code
      
      )
      Co-Authored-By: default avatarClaude Opus 4.5 <noreply@anthropic.com>
      152d0cde
    • shaw's avatar
      27291f2e
  11. 07 Jan, 2026 1 commit
  12. 06 Jan, 2026 3 commits
  13. 05 Jan, 2026 11 commits