Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // All configuration variables can be found in vars.go Version = "5.3.1" Branch = "release" )
View Source
var ( ServerName string ServerMaxPlayers string ServerPassword string ServerAuthSecret string AdminPassword string GamePort string UpdatePort string LocalIpAddress string ServerVisible bool UseSteamP2P bool AdditionalParams string UPNPEnabled bool StartLocalHost bool WorldName string BackupWorldName string SaveInfo string SaveInterval string AutoPauseServer bool AutoSave bool )
Game Server configuration
View Source
var ( IsDebugMode bool //only used for pprof server, keep it like this and check the log level instead. Debug = 10 CreateSSUILogFile bool LogLevel int LogMessageBuffer string IsFirstTimeSetup bool BufferFlushTicker *time.Ticker SSEMessageBufferSize = 2000 MaxSSEConnections = 20 GameServerAppID = "600760" ExePath string GameBranch string SubsystemFilters []string )
Logging, debugging and misc
View Source
var ( DiscordToken string DiscordSession *discordgo.Session IsDiscordEnabled bool ControlChannelID string StatusChannelID string LogChannelID string ErrorChannelID string ConnectionListChannelID string SaveChannelID string ControlPanelChannelID string DiscordCharBufferSize int ControlMessageID string ExceptionMessageID string BlackListFilePath string )
Discord integration
View Source
var ( IsCleanupEnabled bool BackupKeepLastN int BackupKeepDailyFor time.Duration BackupKeepWeeklyFor time.Duration BackupKeepMonthlyFor time.Duration BackupCleanupInterval time.Duration ConfiguredBackupDir string ConfiguredSafeBackupDir string BackupWaitTime time.Duration )
Backup and cleanup settings
Authentication and security
View Source
var ( IsUpdateEnabled bool AllowPrereleaseUpdates bool AllowMajorUpdates bool )
SSUI Updates
View Source
var ( TLSCertPath = "./UIMod/tls/cert.pem" TLSKeyPath = "./UIMod/tls/key.pem" ConfigPath = "./UIMod/config/config.json" CustomDetectionsFilePath = "./UIMod/detectionmanager/customdetections.json" LogFolder = "./UIMod/logs/" UIModFolder = "./UIMod/" TwoBoxFormFolder = "./UIMod/twoboxform/" ConfigHtmlPath = "./UIMod/ui/config.html" DetectionManagerHtmlPath = "./UIMod/detectionmanager/detectionmanager.html" TwoBoxFormHtmlPath = "./UIMod/twoboxform/twoboxform.html" IndexHtmlPath = "./UIMod/ui/index.html" )
File paths
View Source
var ConfigMu sync.Mutex
Functions ¶
This section is empty.
Types ¶
type CustomDetection ¶
type JsonConfig ¶
type JsonConfig struct {
DiscordToken string `json:"discordToken"`
ControlChannelID string `json:"controlChannelID"`
StatusChannelID string `json:"statusChannelID"`
ConnectionListChannelID string `json:"connectionListChannelID"`
LogChannelID string `json:"logChannelID"`
SaveChannelID string `json:"saveChannelID"`
ControlPanelChannelID string `json:"controlPanelChannelID"`
DiscordCharBufferSize int `json:"DiscordCharBufferSize"`
BlackListFilePath string `json:"blackListFilePath"`
IsDiscordEnabled *bool `json:"isDiscordEnabled"`
ErrorChannelID string `json:"errorChannelID"`
BackupKeepLastN int `json:"backupKeepLastN"`
IsCleanupEnabled *bool `json:"isCleanupEnabled"`
BackupKeepDailyFor int `json:"backupKeepDailyFor"`
BackupKeepWeeklyFor int `json:"backupKeepWeeklyFor"`
BackupKeepMonthlyFor int `json:"backupKeepMonthlyFor"`
BackupCleanupInterval int `json:"backupCleanupInterval"`
BackupWaitTime int `json:"backupWaitTime"`
GameBranch string `json:"gameBranch"`
ServerName string `json:"ServerName"`
SaveInfo string `json:"SaveInfo"`
ServerMaxPlayers string `json:"ServerMaxPlayers"`
ServerPassword string `json:"ServerPassword"`
ServerAuthSecret string `json:"ServerAuthSecret"`
AdminPassword string `json:"AdminPassword"`
GamePort string `json:"GamePort"`
UpdatePort string `json:"UpdatePort"`
UPNPEnabled *bool `json:"UPNPEnabled"`
AutoSave *bool `json:"AutoSave"`
SaveInterval string `json:"SaveInterval"`
AutoPauseServer *bool `json:"AutoPauseServer"`
LocalIpAddress string `json:"LocalIpAddress"`
StartLocalHost *bool `json:"StartLocalHost"`
ServerVisible *bool `json:"ServerVisible"`
UseSteamP2P *bool `json:"UseSteamP2P"`
ExePath string `json:"ExePath"`
AdditionalParams string `json:"AdditionalParams"`
Users map[string]string `json:"users"` // Map of username to hashed password
AuthEnabled *bool `json:"authEnabled"` // Toggle for enabling/disabling auth
JwtKey string `json:"JwtKey"`
AuthTokenLifetime int `json:"AuthTokenLifetime"`
Debug *bool `json:"Debug"`
CreateSSUILogFile *bool `json:"CreateSSUILogFile"`
LogLevel int `json:"LogLevel"`
SubsystemFilters []string `json:"subsystemFilters"`
IsUpdateEnabled *bool `json:"IsUpdateEnabled"`
AllowPrereleaseUpdates *bool `json:"AllowPrereleaseUpdates"`
AllowMajorUpdates *bool `json:"AllowMajorUpdates"`
}
func LoadConfig ¶
func LoadConfig() (*JsonConfig, error)
LoadConfig loads and initializes the configuration
Click to show internal directories.
Click to hide internal directories.