config

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authentication

func Authentication() bool

Authentication returns if the proxy should require Xbox Live authentication or not.

func BindAddress

func BindAddress() string

BindAddress returns the address that the proxy should bind to. This should contain the IP address and the port, separated by a colon. E.g. "0.0.0.0:19132".

func ForceTexturePacks

func ForceTexturePacks() bool

ForceTexturePacks returns if texture packs should be required to be downloaded before the player can join the server.

func Load

func Load(configPath string) error

Load attempts to load the configuration from the file located in configPath. If the file does not exist, it will be created with default data. An error is returned if one occurs during the process.

func LogFile

func LogFile() string

LogFile returns the path of the file to log to. If the file does not exist, it will be created when the proxy starts.

func LogLevel

func LogLevel() logrus.Level

LogLevel returns the log level to be used for Logrus. This is only to decide if debugging logs should be printed to console and the LogFile() or not.

func MOTD

func MOTD() string

MOTD returns the "Message Of The Day" shown to clients in the server list.

func MaxPlayers

func MaxPlayers() int

MaxPlayers returns the maximum amount of players allowed on the proxy. If this value is 0 then there will be no limit.

func PlayerLatencyUpdateInterval

func PlayerLatencyUpdateInterval() time.Duration

PlayerLatencyUpdateInterval is how often to update the player's latency to their connected server.

func ReportPlayerLatency

func ReportPlayerLatency() bool

ReportPlayerLatency returns if the proxy should send a player's latency to their connected server. This can be disabled if not needed to save bandwidth over the network.

func ResourcePacks

func ResourcePacks() []*resource.Pack

ResourcePacks returns a slice of resource packs to send to a client when they connect.

func SocketAddress

func SocketAddress() string

SocketAddress returns the address that the socket server should bind to. This should contain the IP address and the port, separated by a colon. E.g. "0.0.0.0:19131".

func SocketSecret

func SocketSecret() string

SocketSecret returns the secret key used for authenticating clients over the socket connection. The connecting clients must match this key completely to be able to authenticate.

func Whitelist

func Whitelist() bool

Whitelist returns if the proxy is whitelisted or not. If true, only the Whitelisted() players can join.

func Whitelisted

func Whitelisted() []string

Whitelisted returns a slice of usernames that are whitelisted on the proxy. They are the only ones who can join when Whitelist() is true.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL