Подготовить HY2XS к production-сборке
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package constant
|
||||
|
||||
const (
|
||||
Shadowrocket = "shadowrocket"
|
||||
Clash = "clash"
|
||||
V2rayN = "v2rayn"
|
||||
NekoBox = "nekobox"
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package constant
|
||||
|
||||
const (
|
||||
CodeSuccess int = 20000
|
||||
CodeSysError int = 50000
|
||||
CodeUnauthorizedError int = 50401
|
||||
CodeForbiddenError int = 50403
|
||||
CodeInvalidError int = 50001
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
package constant
|
||||
|
||||
const (
|
||||
HUIWebPort = "H_UI_WEB_PORT"
|
||||
HUIWebContext = "H_UI_WEB_CONTEXT"
|
||||
HUICrtPath = "H_UI_CRT_PATH"
|
||||
HUIKeyPath = "H_UI_KEY_PATH"
|
||||
JwtSecret = "JWT_SECRET"
|
||||
Hysteria2Enable = "HYSTERIA2_ENABLE"
|
||||
Hysteria2Config = "HYSTERIA2_CONFIG"
|
||||
Hysteria2TrafficTime = "HYSTERIA2_TRAFFIC_TIME"
|
||||
Hysteria2ConfigRemark = "HYSTERIA2_CONFIG_REMARK"
|
||||
Hysteria2ConfigPortHopping = "HYSTERIA2_CONFIG_PORT_HOPPING"
|
||||
ResetTrafficCron = "RESET_TRAFFIC_CRON"
|
||||
ClashExtension = "CLASH_EXTENSION"
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package constant
|
||||
|
||||
const (
|
||||
SysError string = "system error"
|
||||
UnauthorizedError string = "unauthorized"
|
||||
ForbiddenError string = "permission denied"
|
||||
InvalidError string = "invalid"
|
||||
|
||||
IllegalTokenError string = "authentication failed"
|
||||
TokenExpiredError string = "token expired"
|
||||
|
||||
WrongPassword string = "wrong password"
|
||||
ConfigNotExist string = "config not exist"
|
||||
)
|
||||
@@ -0,0 +1,20 @@
|
||||
package constant
|
||||
|
||||
const (
|
||||
LogDir = "logs/"
|
||||
SqliteDBDir = "data/"
|
||||
BinDir = "bin/"
|
||||
ExportPathDir = "export/"
|
||||
|
||||
SqliteDBPath = "data/h_ui.db"
|
||||
|
||||
Hysteria2ConfigPath = "/etc/hysteria/config.yaml"
|
||||
Hysteria2BinPath = "/usr/local/bin/hysteria"
|
||||
|
||||
SystemLogPath = "logs/hy2xs-admin.log"
|
||||
Hysteria2LogPath = "logs/hysteria2.log"
|
||||
|
||||
TokenType = "Bearer"
|
||||
|
||||
Version = "v0.0.22"
|
||||
)
|
||||
Reference in New Issue
Block a user