- 06 Jan, 2026 1 commit
-
-
yangjianbo authored
主要改动: - 固定 Go 1.25.5 与 CI 校验并更新扫描流程 - 升级 quic-go、x/crypto、req 等依赖并通过 govulncheck - 强化 JWT 校验、TLS 配置与 xlsx 动态加载 - 新增审计豁免清单与校验脚本
-
- 05 Jan, 2026 31 commits
-
-
-
yangjianbo authored
修复 golangci-lint gofmt 检查失败,移除 AllowInsecureHTTP 字段后多余的空格。
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Sonnet 4.5 <noreply@anthropic.com>
-
程序猿MT authored
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
当挂载的源文件不存在时,Docker 会自动创建同名目录而非文件。 将配置文件挂载默认注释,用户需要时先创建文件再取消注释。
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
shaw authored
-
yangjianbo authored
- docker-compose.yml 配置文件挂载路径改为 ${CONFIG_FILE:-./config.yaml} - .env.example 添加 CONFIG_FILE 配置项,方便用户指定自定义配置文件🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
yangjianbo authored
在 style-src 中添加 fonts.googleapis.com,在 font-src 中添加 fonts.gstatic.com,解决浏览器控制台因 CSP 策略阻止加载 Google Fonts 样式表的错误。
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
yangjianbo authored
-
Yuhao Jiang authored
在用户列表中添加可选的 ID 列,方便与其他页面(如订阅管理) 显示的"用户 #ID"进行对照定位。 - ID 列位于用户列之后 - 支持排序 - 可在列设置中隐藏
🤖 Generated with [Claude Code](https://claude.ai/code ) Co-Authored-By:Claude <noreply@anthropic.com>
-
yangjianbo authored
-
shaw authored
-
yangjianbo authored
实现 allow_insecure_http 并在关闭校验时执行最小格式验证 - 关闭 allowlist 时要求 URL 可解析且 scheme 合规 - 响应头过滤关闭时使用默认白名单策略 - 更新相关文档、示例与测试覆盖
-
shaw authored
-
shaw authored
-
LLLLLLiulei authored
-
yangjianbo authored
实现安全开关默认关闭与响应头透传逻辑 - URL 校验与响应头过滤支持开关并覆盖流式路径 - 非流式 Content-Type 透传/默认值按配置生效 - 接入 go test、golangci-lint 与前端 lint/typecheck - 补充相关测试与配置/文档说明
-
Jiahao Luo authored
## Changes ### 1. Enhanced Error Messages - Modified CRS sync error handling to show detailed error messages - Changed from generic "internal error" to "CRS sync failed: <details>" - Helps diagnose connection issues with private CRS deployments ### 2. Security Configuration - Added SECURITY_URL_ALLOWLIST_ALLOW_PRIVATE_HOSTS environment variable - Allows administrators to enable/disable private IP access for CRS sync - Production default: false (secure) - Test environment default: true (convenient for internal testing) ### 3. Flexible Configuration Support - Added config.yaml mount support in both production and test environments - Supports dual configuration methods: * config.yaml for detailed/complex configurations * Environment variables for quick overrides - Priority: ENV vars > config.yaml > defaults ## Use Case Enables CRS sync from internal deployments where CRS resolves to private IPs (e.g., 10.x.x.x, 192.168.x.x) while maintaining security by default. ## Files Modified - backend/internal/handler/admin/account_handler.go - deploy/docker-compose.yml - deploy/docker-compose-test.yml
-
Yuhao Jiang authored
前端显示"密钥已配置,留空以保留当前值",但后端验证逻辑直接 要求该字段非空,导致修改其他设置时报错。 修复方案: - 当 TurnstileSecretKey 为空时,检查 previousSettings 是否有已保存的值 - 如果有,使用已保存的值而非返回错误 - 同时移除重复获取 currentSettings 的代码,直接复用 previousSettings
🤖 Generated with [Claude Code](https://claude.ai/code ) Co-Authored-By:Claude <noreply@anthropic.com>
-
shaw authored
-
Jiahao Luo authored
- 修复 Dockerfile 使用 pnpm 替代 npm ci(适配 pnpm 迁移) - 为 docker-compose-test.yml 添加自动构建配置 - 更新测试配置文档说明一键构建命令
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Sonnet 4.5 <noreply@anthropic.com>
-
ianshaw authored
- 添加对 "Expected thinking/redacted_thinking" 错误的检测 - 修复 antigravity 服务中 thinking 模式启用时的结构约束错误 - 确保此类错误能触发重试逻辑
-
ianshaw authored
- 修复FilterThinkingBlocksForRetry对空content数组的处理 - docker-compose添加SECURITY_URL_ALLOWLIST_UPSTREAM_HOSTS配置 - 更新Gemini使用指南链接:检查归属地、修改归属地、激活Gemini Web
-
Jiahao Luo authored
- docs: 更新 README 和 README_CN 中的安装说明 - build: 添加 pnpm-lock.yaml 和 .npmrc 配置 - build: 删除 package-lock.json 锁文件 - fix: 解决 peer dependency 冲突(legacy-peer-deps) - perf: pnpm 提供更快的安装速度和更小的磁盘占用
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Sonnet 4.5 <noreply@anthropic.com>
-
shaw authored
问题:使用 vue-i18n 运行时版本后,带变量的翻译(如 '{days} 天') 无法正确显示,直接显示原始字符串。 原因:运行时版本不含消息编译器,无法在运行时编译消息插值。 解决:启用 JIT 编译(__INTLIFY_JIT_COMPILATION__: true) - JIT 编译器将消息编译为 AST 对象而非 JavaScript 代码 - 通过解释执行 AST 实现插值,无需 eval 或 new Function - 符合 CSP script-src 'self' 策略,不降低安全性 同时将 vite.config.js.timestamp-* 临时文件添加到 .gitignore -
yangjianbo authored
新增 Kimi/BigModel/Minimax 官方域名到 allowlist 保持示例配置与默认值一致
-
shaw authored
-
shaw authored
-
- 04 Jan, 2026 8 commits
-
-
IanShaw027 authored
## 修复内容 ### 1. 统一操作列按钮样式 - 所有操作列按钮统一为"图标+文字"垂直排列样式 - UsersView: 编辑和更多按钮添加文字标签 - 与 AccountsView、GroupsView 等页面保持一致 ### 2. 统一顶部工具条布局(6个管理页面) - 使用 flex + justify-between 布局 - 左侧:模糊搜索框、筛选器(可多行排列) - 右侧:刷新、创建等操作按钮(靠右对齐) - 响应式:宽度不够时右侧按钮自动换行到上一行 ### 3. 修复的页面 - AccountsView: 合并 actions/filters 到单行工具条 - UsersView: 标准左右分栏,操作列添加文字 - GroupsView: 新增搜索框,左右分栏布局 - ProxiesView: 左右分栏,响应式布局 - SubscriptionsView: 新增用户模糊搜索,左右分栏 - UsageView: 补齐所有筛选项,左右分栏 ### 4. 新增功能 - GroupsView: 新增分组名称/描述模糊搜索 - SubscriptionsView: 新增用户模糊搜索功能 - UsageView: 补齐 API Key 搜索筛选 ### 5. 国际化 - 新增相关搜索框的 placeholder 文案(中英文) ## 技术细节 - 使用 flex-wrap-reverse 实现响应式换行 - 左侧筛选区使用 flex-wrap 支持多行 - 右侧按钮区使用 ml-auto + justify-end 保持右对齐 - 移动端使用 w-full sm:w-* 响应式宽度 ## 验证结果 -
✅ TypeScript 类型检查通过 -✅ 所有页面布局统一 -✅ 响应式布局正常工作 -
IanShaw027 authored
修复内容: 1. 修复 6 个 golangci-lint 错误 - 3 个 errcheck 错误:在 gateway_request_test.go 中添加类型断言检查 - 3 个 gofmt 格式化问题:修复代码格式 2. 修复 API 契约测试失败 - 在测试中添加缺失的字段:enable_identity_patch 和 identity_patch_prompt 所有测试和 linter 检查现已通过。
-
IanShaw027 authored
## 修复内容 ### 1. AccountsView 功能恢复 - 恢复3个缺失的模态框组件: - ReAuthAccountModal.vue - 重新授权功能 - AccountTestModal.vue - 测试连接功能 - AccountStatsModal.vue - 查看统计功能 - 恢复 handleTest/handleViewStats/handleReAuth 调用模态框 - 修复 UpdateAccountRequest 类型定义(添加 schedulable 字段) ### 2. DashboardView 修复 - 恢复 formatBalance 函数(支持千位分隔符显示) - 为 UserDashboardStats 添加完整 Props 类型定义 - 为 UserDashboardRecentUsage 添加完整 Props 类型定义 - 优化格式化函数到共享 utils/format.ts ### 3. 类型安全增强 - 修复 UserAttributeOption 索引签名兼容性 - 移除未使用的类型导入 - 所有组件 Props 类型完整 ## 验证结果 -
✅ TypeScript 类型检查通过(0 errors) -✅ vue-tsc 检查通过(0 errors) -✅ 所有样式与重构前100%一致 -✅ 所有功能完整恢复 ## 影响范围 - AccountsView: 代码行数从974行优化到189行(提升80.6%可维护性) - DashboardView: 保持组件化同时恢复所有原有功能 - 深色模式支持完整 - 所有颜色方案和 SVG 图标保持一致 Closes #149 -
shaw authored
使用 vue-i18n 纯运行时版本替代默认版本,避免运行时消息编译 需要 `new Function` 而被 CSP `script-src 'self'` 策略阻止。
-
IanShaw027 authored
-
IanShaw027 authored
解决了以下文件的冲突: - backend/internal/handler/admin/setting_handler.go - 采用 upstream 的字段对齐风格和 *Configured 字段名 - 添加 EnableIdentityPatch 和 IdentityPatchPrompt 字段 - backend/internal/handler/gateway_handler.go - 采用 upstream 的 billingErrorDetails 错误处理方式 - frontend/src/api/admin/settings.ts - 采用 upstream 的 *_configured 字段名 - 添加 enable_identity_patch 和 identity_patch_prompt 字段 - frontend/src/views/admin/SettingsView.vue - 合并 turnstile_secret_key_configured 字段 - 保留 enable_identity_patch 和 identity_patch_prompt 字段
-
IanShaw027 authored
1. 资源管理冗余(ForwardGemini双重Close) - 错误分支读取body后立即关闭原始body,用内存副本重新包装 - defer添加nil guard,避免重复关闭 - fallback成功时显式关闭旧body,确保连接释放 2. Schema校验丢失(cleanJSONSchema移除字段无感知) - 新增schemaCleaningWarningsEnabled()支持环境变量控制 - 实现warnSchemaKeyRemovedOnce()在非release模式下告警 - 移除关键验证字段时输出warning,包含key和path 3. UI响应式风险(UsersView操作菜单硬编码定位) - 菜单改为先粗定位、渲染后测量、再clamp到视口内 - 添加max-height + overflow-auto,超出时可滚动 - 增强交互:点击其它位置/滚动/resize自动关闭或重新定位 4. 身份补丁干扰(TransformClaudeToGemini默认注入) - 新增TransformOptions + TransformClaudeToGeminiWithOptions - 系统设置新增enable_identity_patch、identity_patch_prompt - 完整打通handler/dto/service/frontend配置链路 - 默认保持启用,向后兼容现有行为 测试: - 后端单测全量通过:go test ./... - 前端类型检查通过:npm run typecheck
-
shaw authored
-