feat(api): Key 改为明文保存可随时复制,新增口令列与一键复制接入信息(地址+使用者+口令)

This commit is contained in:
sgp
2026-11-04 21:25:12 +08:00
parent f7f700d32a
commit d1f1a5db7a
4 changed files with 83 additions and 13 deletions
+2
View File
@@ -73,6 +73,8 @@ function create() {
const rec = {
id: 'key_' + crypto.randomBytes(4).toString('hex'),
name,
// 内部使用:明文保存,便于后台查看/复制;hash 仅作兼容
key: raw,
hash: crypto.createHash('sha256').update(raw).digest('hex'),
enabled: true,
ratePerMin: Number(args.rate || CONFIG.defaultRatePerMin || 60),