Files
cursornew2026/backend
ccdojox-crypto 73a71f198f 蜂鸟Pro v2.0.1 - 基础框架版本 (待完善)
## 当前状态
- 插件界面已完成重命名 (cursorpro → hummingbird)
- 双账号池 UI 已实现 (Auto/Pro 卡片)
- 后端已切换到 MySQL 数据库
- 添加了 Cursor 官方用量 API 文档

## 已知问题 (待修复)
1. 激活时检查账号导致无账号时激活失败
2. 未启用无感换号时不应获取账号
3. 账号用量模块不显示 (seamless 未启用时应隐藏)
4. 积分显示为 0 (后端未正确返回)
5. Auto/Pro 双密钥逻辑混乱,状态不同步
6. 账号添加后无自动分析功能

## 下一版本计划
- 重构数据模型,优化账号状态管理
- 实现 Cursor API 自动分析账号
- 修复激活流程,不依赖账号
- 启用无感时才分配账号
- 完善账号用量实时显示

## 文件说明
- docs/系统设计文档.md - 完整架构设计
- cursor 官方用量接口.md - Cursor API 文档
- 参考计费/ - Vibeviewer 开源项目参考

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 11:21:52 +08:00
..
2025-12-16 20:54:44 +08:00
2025-12-16 20:54:44 +08:00
2025-12-16 20:54:44 +08:00
2025-12-16 20:54:44 +08:00
2025-12-16 20:54:44 +08:00
2025-12-16 20:54:44 +08:00

蜂鸟CursorPro 后端

域名配置

类型 域名 说明
主域名 api.aicode.edu.pl 主后台服务器
备用域名1 hb.aicode.edu.pl 反代到主域名
备用域名2 cursor.aicode.edu.pl 反代到主域名
备用域名3 pro.aicode.edu.pl 反代到主域名

登录信息

管理后台: https://api.aicode.edu.pl/
用户名: admin
密码: Hb@2024Pro!

外部API

Token: hb-ext-9kX2mP5nQ8rT1vY4zA7c
Header: X-API-Token

批量上传: POST /admin/external/accounts/batch
账号统计: GET /admin/external/accounts/stats

部署

# 上传到服务器
cd /opt/cursorpro

# 启动 (首次自动创建venv并安装依赖)
./start.sh

# 停止
./stop.sh

# 查看日志
tail -f cursorpro.log

部署信息:

登录信息: 用户名: admin 密码: Hb@2024Pro!

外部API Token: hb-ext-9kX2mP5nQ8rT1vY4zA7c

现在需要配置备用域名反代吗?还是先测试插件对接?

Nginx 配置

主域名 (api.aicode.edu.pl)

server {
    listen 443 ssl http2;
    server_name api.aicode.edu.pl;

    ssl_certificate /etc/ssl/api.aicode.edu.pl.pem;
    ssl_certificate_key /etc/ssl/api.aicode.edu.pl.key;

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

备用域名 (反代到主域名)

server {
    listen 443 ssl http2;
    server_name hb.aicode.edu.pl;  # 或 cursor.aicode.edu.pl / pro.aicode.edu.pl

    ssl_certificate /etc/ssl/hb.aicode.edu.pl.pem;
    ssl_certificate_key /etc/ssl/hb.aicode.edu.pl.key;

    location / {
        proxy_pass https://api.aicode.edu.pl;
        proxy_set_header Host api.aicode.edu.pl;
        proxy_ssl_server_name on;
    }
}

客户端插件域名配置

插件 extension/out/api/client.js 中已配置:

const API_DOMAINS = [
    'https://api.aicode.edu.pl',      // 主域名
    'https://hb.aicode.edu.pl',       // 备用域名1
    'https://cursor.aicode.edu.pl',   // 备用域名2
    'https://pro.aicode.edu.pl',      // 备用域名3
    'http://127.0.0.1:8000'           // 本地开发
];

自动故障转移:主域名失败会自动切换到备用域名。