fix(runtime): закрыть fix2 P0 runtime pass без legacy
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user