feat: 用户个人页面展示当前 VPN 连接信息

- handler/vpn.go: 新增 GetMyVpnConnections,返回当前用户的在线
  VPN 连接列表(IP/连接时间)及 max_conns_per_user 上限
- router.go: 注册 GET /api/me/vpn/connections(普通用户可访问)
- ProfileView.vue: 新增"我的 VPN 连接"区块,含 n/max 徽章、
  IPv4/IPv6/连接时间表格,底部提示异常连接请修改密码
- zh.ts/en.ts: 新增 myVpnConnections/noConnections/
  abnormalConnectionHint 国际化
This commit is contained in:
2026-07-10 13:53:49 +08:00
parent c63440435e
commit aad8fa9848
5 changed files with 93 additions and 0 deletions
+1
View File
@@ -26,6 +26,7 @@ func Setup(r *gin.Engine) {
auth.PUT("/me/password", handler.ChangePassword)
auth.GET("/me/sessions", handler.ListMySessions)
auth.DELETE("/me/sessions/:sessionId", handler.RevokeMySession)
auth.GET("/me/vpn/connections", handler.GetMyVpnConnections)
}
admin := r.Group("/api/admin")