Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ Enabled: false, Routes: []Route{}, }
DefaultConfig is the default configuration for Lite mode.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Enabled bool `yaml:"enabled,omitempty" json:"enabled,omitempty"` Routes []Route `yaml:"routes,omitempty" json:"routes,omitempty"` }
Config is the configuration for Lite mode.
type Route ¶
type Route struct { Host configutil.SingleOrMulti[string] `json:"host,omitempty" yaml:"host,omitempty"` Backend configutil.SingleOrMulti[string] `json:"backend,omitempty" yaml:"backend,omitempty"` CachePingTTL configutil.Duration `json:"cachePingTTL,omitempty" yaml:"cachePingTTL,omitempty"` // 0 = default, < 0 = disabled Fallback *Status `json:"fallback,omitempty" yaml:"fallback,omitempty"` // nil = disabled ProxyProtocol bool `json:"proxyProtocol,omitempty" yaml:"proxyProtocol,omitempty"` // Deprecated: use TCPShieldRealIP instead. RealIP bool `json:"realIP,omitempty" yaml:"realIP,omitempty"` TCPShieldRealIP bool `json:"tcpShieldRealIP,omitempty" yaml:"tcpShieldRealIP,omitempty"` ModifyVirtualHost bool `json:"modifyVirtualHost,omitempty" yaml:"modifyVirtualHost,omitempty"` }
func (*Route) CachePingEnabled ¶ added in v0.26.0
CachePingEnabled returns true if the route has a ping cache enabled.
func (*Route) GetCachePingTTL ¶ added in v0.26.0
GetCachePingTTL returns the configured ping cache TTL or a default duration if not set.
func (*Route) GetTCPShieldRealIP ¶ added in v0.36.2
GetTCPShieldRealIP returns the configured TCPShieldRealIP or deprecated RealIP value.
type Status ¶ added in v0.31.0
type Status struct { MOTD *configutil.TextComponent `yaml:"motd,omitempty" json:"motd,omitempty"` Version ping.Version `yaml:"version,omitempty" json:"version,omitempty"` Favicon favicon.Favicon `yaml:"favicon,omitempty" json:"favicon,omitempty"` ModInfo modinfo.ModInfo `yaml:"modInfo,omitempty" json:"modInfo,omitempty"` }
Click to show internal directories.
Click to hide internal directories.