Versions in this module Expand all Collapse all v0 v0.0.5 Apr 4, 2024 Changes in this version type UserConfig + Flow string v0.0.4 Nov 1, 2023 Changes in this version type Config + IPLimit int64 v0.0.3 Nov 1, 2023 v0.0.2 Oct 31, 2023 Changes in this version + func InStr(s string, list []string) bool + type Config struct + CheckRate int + IgnoreEmptyVmessID bool + MySQL *MySQLConfig + NodeID uint + UserConfig *UserConfig + type DB struct + DB *gorm.DB + RetryTimes int64 + func NewMySQLConn(config *MySQLConfig) (*DB, error) + func (db *DB) GetAllUsers(nodeID uint) ([]UserModel, error) + func (db *DB) GetNode(id uint) (*Node, error) + type HandlerServiceClient struct + func NewHandlerServiceClient(client *grpc.ClientConn, inboundTag string) *HandlerServiceClient + func (h *HandlerServiceClient) AddUser(user *protocol.User) error + func (h *HandlerServiceClient) AlterInbound(req *command.AlterInboundRequest) error + func (h *HandlerServiceClient) DelUser(email string) error + type MySQLConfig struct + DBName string + Host string + Password string + Port int + User string + func (c *MySQLConfig) FormatDSN() (string, error) + type Node struct + ID uint + NodeGroup int + NodeLevel int + TrafficRate float64 + func (*Node) TableName() string + type NodeIP struct + CreatedAt int64 + ID uint + IPList string + NodeID uint + Port int + UserID uint + func (*NodeIP) TableName() string + func (n *NodeIP) BeforeCreate(scope *gorm.Scope) error + type NodeInfo struct + ID uint + Load string + LogTime int64 + NodeID uint + Uptime time.Duration + func (*NodeInfo) TableName() string + func (l *NodeInfo) BeforeCreate(scope *gorm.Scope) error + type NodeOnlineLog struct + ID uint + LogTime int64 + NodeID uint + OnlineUser int + func (*NodeOnlineLog) TableName() string + func (l *NodeOnlineLog) BeforeCreate(scope *gorm.Scope) error + type Panel struct + func NewPanel(gRPCConn *grpc.ClientConn, db *DB, cfg *Config) (*Panel, error) + func (p *Panel) Start() + type StatsServiceClient struct + func NewStatsServiceClient(client *grpc.ClientConn) *StatsServiceClient + type UserConfig struct + AlterID uint32 + InboundTag string + Level uint32 + SecurityStr string + func (c *UserConfig) UnmarshalJSON(data []byte) error + type UserModel struct + Email string + ID uint + Port int + VmessID string + func (*UserModel) TableName() string + type UserTrafficLog struct + Downlink uint64 + ID uint + LogTime int64 + NodeID uint + Rate float64 + Traffic string + Uplink uint64 + UserID uint + func (l *UserTrafficLog) BeforeCreate(scope *gorm.Scope) error