0782cf651bc040da939933b7a5d2c72971a027dc
- 用户 TOTP(auth/totp_user.go,复用 internal/totp + AES-256-GCM 加密存密钥):
POST /v1/me/totp/setup(生成密钥+otpauth_uri)、/verify(校验码→启用)、
/disable(校验码→清空)。仅在 USER_TOTP_ENC_KEY(32B/64hex) 配置时挂载。
- 登录二段式:Login 在 totp_enabled 时不发 token,改发短期 pending token(Redis
5min)+ 返回 {totp_required, pending_token};POST /v1/auth/login/totp 消费
pending + 校验码 → 发 token。非 TOTP 用户仍走扁平 TokenPair,app 不受影响。
- User 结构 + GetUserByEmail 补 totp_enabled。
- 单测覆盖 AES seal/open 往返 + 篡改/错误密钥检测 + pending token 唯一性。
- 全量 server 23 包测试通过。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pangolin
面向中国大陆用户的终端 VPN(科学上网)项目。
- 设计方案:
docs/技术方案.md - 实施计划:
plan/ - 部署(Phase 0,容器化 + CI/CD):
deploy/
Phase 0 现状
数据面两条线,容器化、经 Gitea Actions 自动部署到节点,与现网服务隔离:
- Xray VLESS + REALITY(主线,经宿主 nginx SNI 分流)
- sing-box Hysteria2(晚高峰加速线,UDP 443)
部署细节见 deploy/README.md。
Description
Releases
20
server 1.1.0
Latest
Languages
Go
39.9%
Dart
21.1%
JavaScript
14.7%
Shell
5.2%
HTML
4.8%
Other
14%