- 06 Jan, 2026 5 commits
-
-
shaw authored
-
shaw authored
- docker-compose.yml: 添加注释说明设置固定 JWT_SECRET 可防止容器重启后登录失效 - .env.example: 添加 openssl rand -hex 32 生成安全密钥的命令
-
shaw authored
- 移除 Install() 和 AutoSetupFromEnv() 中 release 模式下 JWT Secret 必填检查 - 移除 config.Validate() 中 release 模式下的 JWT 验证 - 新增 GetDataDir() 函数,自动检测数据目录:DATA_DIR 环境变量 > /app/data > 当前目录 - config.yaml 和 .installed 文件现在写入正确的数据目录 - config.Load() 添加 /app/data 到配置搜索路径 这修复了两个问题: 1. Web Setup Wizard 在 release 模式下无法完成安装 2. Docker 部署时 config.yaml 未被持久化导致每次重启重新初始化
-
shaw authored
在 script-src 和 frame-src 中添加 challenges.cloudflare.com 域名, 允许 Turnstile 脚本加载和 iframe 渲染。
-
shaw authored
-
- 05 Jan, 2026 35 commits
-
-
shaw authored
-
shaw authored
-
shaw authored
## Summary - 修复账号管理页面组件拆分时遗漏的功能 - 统一所有内联 SVG 为 Icon 组件 - 修复 ProxySelector 选择"无代理"时发送错误值的问题 ## Changes - AccountTableFilters: 添加 Antigravity 平台选项、类型筛选器、inactive 状态 - AccountActionMenu: 恢复重置状态和清除限速按钮 - AccountsView: 修正 handleClearRateLimit 调用正确的 API - ProxySelector: 修复选择"无代理"时发送 null 而不是 0 ## Conflict Resolution - ProxySelector.vue: 采用 PR 分支的正确逻辑(发送 null 而不是 0) 这是正确的修复,因为后端使用 *int64 类型,nil 会触发 ClearProxyID()
-
shaw authored
- 用户允许分组:前端发送空数组而非 null 表示"允许全部" - 账户代理:前端发送 0 而非 null 表示"无代理" - 后端 UpdateAccount/BulkUpdate 正确处理 ProxyID=0 为清除代理
-
IanShaw027 authored
将 handleToggleSchedulable 从 PUT update() 改为 POST setSchedulable(), 后端 PUT 接口不处理 schedulable 字段,导致切换无效。
-
IanShaw027 authored
- 扩展 Icon.vue 组件,新增 60+ 图标路径 - 导航类: arrowRight, arrowLeft, arrowUp, arrowDown, chevronUp, externalLink - 状态类: checkCircle, xCircle, exclamationCircle, exclamationTriangle, infoCircle - 用户类: user, userCircle, userPlus, users - 文档类: document, clipboard, copy, inbox - 操作类: download, upload, filter, sort - 安全类: key, lock, shield - UI类: menu, calendar, home, terminal, gift, creditCard, mail - 数据类: chartBar, trendingUp, database, cube - 其他: bolt, sparkles, cloud, server, sun, moon, book 等 - 重构 56 个 Vue 组件,用 Icon 组件替换内联 SVG - 净减少约 2200 行代码 - 提升代码可维护性和一致性 - 统一图标样式和尺寸管理
-
IanShaw027 authored
修复 golangci-lint unused 检查失败
-
longgexx authored
-
longgexx authored
- 允许余额透支策略 ## 问题 - 扣费失败时只记录日志,不阻止请求完成 - 用户可以用极少余额无限次免费使用服务 - 数据库层使用 BalanceGTE 条件防止余额变负,导致余额不足时扣费失败 ## 修复 - 移除 DeductBalance 方法中的 BalanceGTE 条件,允许余额变为负数 - 修改错误返回:用户不存在时返回 ErrUserNotFound - 实现透支策略:余额不足时允许本次请求完成,余额变负后阻止后续请求 ## 测试 - 更新 TestDeductBalance_InsufficientFunds 测试,验证透支功能 - 更新 TestDeductBalance_NotFound 测试,验证正确的错误类型 - 新增 TestDeductBalance_AllowsOverdraft 测试,专门测试透支场景 - 所有测试通过
✅ -
ianshaw authored
-
-
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
-
ianshaw authored
- 创建 Icon.vue 统一管理 SVG 图标(20+ 常用图标) - 修复 AccountActionMenu 中被错误替换为 emoji 的图标 - 修复 ProfileView 和 GroupsView 中的 emoji 图标 - 图标支持 size/strokeWidth 属性,便于复用
-
LLLLLLiulei authored
-
ianshaw authored
-
yangjianbo authored
实现安全开关默认关闭与响应头透传逻辑 - URL 校验与响应头过滤支持开关并覆盖流式路径 - 非流式 Content-Type 透传/默认值按配置生效 - 接入 go test、golangci-lint 与前端 lint/typecheck - 补充相关测试与配置/文档说明
-
ianshaw authored
- 筛选组件保持固定宽度,不再自动拉伸填充 - 左右分布布局,中间自然留空 - 修复 IP 管理页面表头缺失的中文翻译
-
ianshaw authored
- 恢复 API Key、账号、分组、类型、计费类型等列 - 恢复 Token 详情显示(含缓存读写) - 恢复首Token时间、耗时列 - 恢复请求ID列及复制功能
-
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
-