Commit Graph

5 Commits

Author SHA1 Message Date
Jiahao Luo
204190f807 feat(crs-sync): improve error messages and add private IP allowlist support
## 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
2026-01-05 12:57:03 +08:00
Jiahao Luo
0f79c3cc0e fix(docker): 修复 Dockerfile npm 构建错误并优化测试配置
- 修复 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>
2026-01-05 11:10:31 +08:00
IanShaw027
06d483fa8d feat(backend): implement gemini quota simulation and rate limiting
- feat: add local quota tracking for gemini tiers (Legacy/Pro/Ultra)
- feat: implement PreCheckUsage in RateLimitService
- feat: align gemini daily reset window with PST
- fix: sticky session fallback logic
2026-01-01 04:29:22 +08:00
yangjianbo
5376786694 chore(配置): 提升容器文件描述符上限到10万
调整原因:
- 防止高并发下出现 "too many open files" 错误
- 统一测试与生产环境的 ulimits 配置

改动内容:
- 为 sub2api、postgres、redis 设置 nofile
- 软硬限制均为 100000

测试: 未运行
2025-12-30 20:28:41 +08:00
yangjianbo
bff3c66d69 feat: 增加测试用docker compose配置文件 2025-12-30 09:00:42 +08:00