Files

38 lines
1.1 KiB
Go

package db
// GlobalConfig 全局配置
type GlobalConfig struct {
ID int `json:"id"`
ServerAddr string `json:"serverAddr"`
ServerPort int `json:"serverPort"`
Token string `json:"token"`
AdminPort int `json:"adminPort"` // ← 新增
LogLevel string `json:"logLevel"`
LogMaxDays int `json:"logMaxDays"`
TcpMux bool `json:"tcpMux"`
TcpMuxKeepalive int `json:"tcpMuxKeepalive"`
HeartbeatInterval int `json:"heartbeatInterval"`
HeartbeatTimeout int `json:"heartbeatTimeout"`
PoolCount int `json:"poolCount"`
WireProtocolV2 bool `json:"wireProtocolV2"`
}
// Proxy 隧道配置
type Proxy struct {
ID int `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
LocalIP string `json:"localIP"`
LocalPort int `json:"localPort"`
RemotePort int `json:"remotePort"`
Enabled bool `json:"enabled"`
}
// User 用户
type User struct {
ID int `json:"id"`
Username string `json:"username"`
PasswordHash string `json:"-"`
CreatedAt string `json:"createdAt"`
}