fix(runtime): закрыть fix2 P0 runtime pass без legacy

This commit is contained in:
2026-04-28 03:28:19 +05:00
parent e2901db6cd
commit 96d9bbcece
31 changed files with 264 additions and 631 deletions
+27 -12
View File
@@ -1,20 +1,35 @@
package constant
const (
LogDir = "logs/"
SqliteDBDir = "data/"
BinDir = "bin/"
ExportPathDir = "export/"
import (
"os"
"path/filepath"
)
SqliteDBPath = "data/h_ui.db"
func getenv(name string, fallback string) string {
value := os.Getenv(name)
if value == "" {
return fallback
}
return value
}
var (
DataRootDir = getenv("HUI_DATA", "/var/lib/hy2xs-admin")
LogDir = getenv("HUI_LOG", "/var/log/hy2xs")
SqliteDBDir = DataRootDir
BinDir = filepath.Join(DataRootDir, "bin")
ExportPathDir = filepath.Join(DataRootDir, "export")
SqliteDBPath = filepath.Join(DataRootDir, "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"
SystemLogPath = filepath.Join(LogDir, "hy2xs-admin.log")
Hysteria2LogPath = filepath.Join(LogDir, "hysteria2.log")
)
const (
TokenType = "Bearer"
Version = "v0.0.22"
)