Bind Feishu identity to OpenVPN sessions and refine management UI

This commit is contained in:
opsx committed 2026-10-22 23:24:41 +08:00
1 parent 347799cb1e
commit 8fd8c0cd73
27 files changed
+1556 -1011

No files matched your search

+13
View File
@@ -28,6 +28,17 @@ type IdentityGrant struct {
Consumed bool `gorm:"default:false"`
}
// IdentityProfile is display metadata from a verified Feishu user-info response.
// It grants no VPN permissions and contains no upstream access token.
type IdentityProfile struct {
ID uint `gorm:"primaryKey"`
Issuer string `gorm:"uniqueIndex:idx_identity_profile;size:256"`
AppID string `gorm:"uniqueIndex:idx_identity_profile;size:128"`
Subject string `gorm:"uniqueIndex:idx_identity_profile;size:256"`
Name string `gorm:"size:256"`
UpdatedAt time.Time
}
// TrafficSample 流量时间序列采样(每 60 秒一次,用于趋势图) // Logan.Li
type TrafficSample struct {
ID uint `gorm:"primaryKey" json:"id"`
@@ -175,6 +186,7 @@ type AuditLog struct {
// VPNSession 在线会话(跨协议统一记录拨号用户的连接状态) // Logan.Li
type VPNSession struct {
DisplayName string `gorm:"size:256" json:"display_name,omitempty"`
ID uint `gorm:"primaryKey" json:"id"`
TunnelID uint `gorm:"index" json:"tunnel_id"`
VPNUserID uint `gorm:"index" json:"vpn_user_id"`
@@ -191,6 +203,7 @@ type VPNSession struct {
// ConnectionLog 连接审计日志(连接/断开/认证失败/配额超额/异常流量) // Logan.Li
type ConnectionLog struct {
DisplayName string `gorm:"size:256" json:"display_name,omitempty"`
ID uint `gorm:"primaryKey" json:"id"`
TunnelID uint `gorm:"index" json:"tunnel_id"`
Username string `gorm:"size:128" json:"username"`