Русифицировать README и интерфейс HY2XS admin
This commit is contained in:
@@ -28,3 +28,4 @@ type AccountExport struct {
|
||||
ConAt int64 `json:"conAt"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
|
||||
@@ -203,3 +203,4 @@ type serverConfigMasquerade struct {
|
||||
ListenHTTPS *string `yaml:"listenHTTPS,omitempty" json:"listenHTTPS" validate:"omitempty"`
|
||||
ForceHTTPS *bool `yaml:"forceHTTPS,omitempty" json:"forceHTTPS" validate:"omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -4,3 +4,4 @@ type Hysteria2UserTraffic struct {
|
||||
Tx int64 `json:"tx"` // upload
|
||||
Rx int64 `json:"rx"` // download
|
||||
}
|
||||
|
||||
|
||||
@@ -25,3 +25,4 @@ type ClashConfig struct {
|
||||
Proxies []interface{} `yaml:"proxies"`
|
||||
ProxyGroups []ProxyGroup `yaml:"proxy-groups"`
|
||||
}
|
||||
|
||||
|
||||
@@ -6,3 +6,4 @@ const (
|
||||
V2rayN = "v2rayn"
|
||||
NekoBox = "nekobox"
|
||||
)
|
||||
|
||||
|
||||
@@ -7,3 +7,4 @@ const (
|
||||
CodeForbiddenError int = 50403
|
||||
CodeInvalidError int = 50001
|
||||
)
|
||||
|
||||
|
||||
@@ -14,3 +14,4 @@ const (
|
||||
ResetTrafficCron = "RESET_TRAFFIC_CRON"
|
||||
ClashExtension = "CLASH_EXTENSION"
|
||||
)
|
||||
|
||||
|
||||
@@ -12,3 +12,4 @@ const (
|
||||
WrongPassword string = "wrong password"
|
||||
ConfigNotExist string = "config not exist"
|
||||
)
|
||||
|
||||
|
||||
@@ -18,3 +18,4 @@ const (
|
||||
|
||||
Version = "v0.0.22"
|
||||
)
|
||||
|
||||
|
||||
@@ -34,3 +34,4 @@ type AccountUpdateDto struct {
|
||||
Deleted *int64 `json:"deleted" form:"deleted" validate:"omitempty,oneof=0 1"`
|
||||
Remark *string `json:"remark" form:"remark" validate:"omitempty,min=0,max=32"`
|
||||
}
|
||||
|
||||
|
||||
@@ -16,3 +16,4 @@ type ConfigUpdateDto struct {
|
||||
type ConfigsUpdateDto struct {
|
||||
ConfigUpdateDtos []ConfigUpdateDto `json:"configUpdateDtos" form:"configUpdateDtos" validate:"required"`
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package dto
|
||||
|
||||
type BaseDto struct {
|
||||
PageNum *int64 `json:"pageNum" form:"pageNum" validate:"required,gt=0"` // 页号
|
||||
PageSize *int64 `json:"pageSize" form:"pageSize" validate:"required,gt=0"` // 页大小
|
||||
StartTime *int64 `json:"startTime" form:"startTime" validate:"omitempty,gt=0"` // 开始时间
|
||||
EndTime *int64 `json:"endTime" form:"endTime" validate:"omitempty,gt=0"` // 结束时间
|
||||
PageNum *int64 `json:"pageNum" form:"pageNum" validate:"required,gt=0"` // Номер страницы
|
||||
PageSize *int64 `json:"pageSize" form:"pageSize" validate:"required,gt=0"` // Размер страницы
|
||||
StartTime *int64 `json:"startTime" form:"startTime" validate:"omitempty,gt=0"` // Время начала
|
||||
EndTime *int64 `json:"endTime" form:"endTime" validate:"omitempty,gt=0"` // Время окончания
|
||||
}
|
||||
|
||||
type IdDto struct {
|
||||
Id *int64 `json:"id" form:"id" validate:"required,gt=0"` // 主键
|
||||
Id *int64 `json:"id" form:"id" validate:"required,gt=0"` // Первичный ключ
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ type Hysteria2AuthDto struct {
|
||||
|
||||
type Hysteria2KickDto struct {
|
||||
Ids []int64 `json:"ids" form:"ids" validate:"required"`
|
||||
KickUtilTime *int64 `json:"kickUtilTime" form:"kickUtilTime" validate:"required"` // 解禁时间
|
||||
KickUtilTime *int64 `json:"kickUtilTime" form:"kickUtilTime" validate:"required"` // Время снятия блокировки
|
||||
}
|
||||
|
||||
type Hysteria2VersionDto struct {
|
||||
@@ -25,3 +25,4 @@ type Hysteria2UrlDto struct {
|
||||
AccountId *int64 `json:"accountId" form:"accountId" validate:"required,gt=0"`
|
||||
Hostname *string `json:"hostname" form:"hostname" validate:"required,min=1,max=255"`
|
||||
}
|
||||
|
||||
|
||||
@@ -7,3 +7,4 @@ type LogDto struct {
|
||||
type LogExportDto struct {
|
||||
Option *int `json:"option" form:"option" validate:"required,oneof=0 1"`
|
||||
}
|
||||
|
||||
|
||||
@@ -3,3 +3,4 @@ package dto
|
||||
type ServerDto struct {
|
||||
Port *int64 `json:"port" form:"port" validate:"required,min=1,max=65535"`
|
||||
}
|
||||
|
||||
|
||||
@@ -18,3 +18,4 @@ type Account struct {
|
||||
ConAt *int64 `gorm:"column:con_at;default:0" json:"conAt"`
|
||||
Remark *string `gorm:"column:remark;default:''" json:"remark"`
|
||||
}
|
||||
|
||||
|
||||
@@ -6,3 +6,4 @@ type Config struct {
|
||||
Remark *string `gorm:"column:remark;default:''" json:"remark"`
|
||||
BaseEntity `gorm:"embedded"`
|
||||
}
|
||||
|
||||
|
||||
@@ -7,3 +7,4 @@ type BaseEntity struct {
|
||||
CreateTime *time.Time `gorm:"column:create_time;default:null" json:"createTime"`
|
||||
UpdateTime *time.Time `gorm:"column:update_time;default:null" json:"updateTime"`
|
||||
}
|
||||
|
||||
|
||||
@@ -29,3 +29,4 @@ type AccountInfoVo struct {
|
||||
Username string `json:"username"`
|
||||
Roles []string `json:"roles"`
|
||||
}
|
||||
|
||||
|
||||
@@ -5,3 +5,4 @@ type ConfigVo struct {
|
||||
Value string `json:"value"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
|
||||
@@ -38,3 +38,4 @@ type Hysteria2AcmePathVo struct {
|
||||
CrtPath string `json:"crtPath"`
|
||||
KeyPath string `json:"keyPath"`
|
||||
}
|
||||
|
||||
|
||||
@@ -4,3 +4,4 @@ type JwtVo struct {
|
||||
TokenType string `json:"tokenType"`
|
||||
AccessToken string `json:"accessToken"`
|
||||
}
|
||||
|
||||
|
||||
@@ -21,3 +21,4 @@ type LogHysteria2Vo struct {
|
||||
Msg string `json:"msg"`
|
||||
Time string `json:"time"`
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,9 @@ type SystemMonitorVo struct {
|
||||
}
|
||||
|
||||
type Hysteria2MonitorVo struct {
|
||||
UserTotal int64 `json:"userTotal"` // 在线用户数
|
||||
DeviceTotal int64 `json:"deviceTotal"` // 在线设备数
|
||||
Version string `json:"version"` // 版本
|
||||
Running bool `json:"running"` // 运行状态
|
||||
UserTotal int64 `json:"userTotal"` // Количество пользователей онлайн
|
||||
DeviceTotal int64 `json:"deviceTotal"` // Количество устройств онлайн
|
||||
Version string `json:"version"` // Версия
|
||||
Running bool `json:"running"` // Статус выполнения
|
||||
}
|
||||
|
||||
|
||||
@@ -44,3 +44,4 @@ func Fail(message string, c *gin.Context) {
|
||||
Data: nil,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,3 +6,4 @@ type BaseVo struct {
|
||||
Id int64 `json:"id"`
|
||||
CreateTime time.Time `json:"createTime"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user