Files
HY2XS_flamy/apps/model/constant/system.go
T

36 lines
774 B
Go

package constant
import (
"os"
"path/filepath"
)
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 = filepath.Join(LogDir, "hy2xs-admin.log")
Hysteria2LogPath = filepath.Join(LogDir, "hysteria2.log")
)
const (
TokenType = "Bearer"
Version = "v0.0.22"
)