lite

package
v0.26.8 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearVirtualHost

func ClearVirtualHost(name string) string

ClearVirtualHost cleans the given virtual host.

func FindRoute

func FindRoute(pattern string, routes ...config.Route) (host string, ep *config.Route)

FindRoute returns the first route that matches the given wildcard supporting pattern.

func Forward added in v0.26.0

func Forward(
	dialTimeout time.Duration,
	routes []config.Route,
	log logr.Logger,
	client netmc.MinecraftConn,
	handshake *packet.Handshake,
	pc *proto.PacketContext,
)

Forward forwards a client connection to a matching backend route.

func IsRealIP

func IsRealIP(addr string) bool

IsRealIP returns true if the given virtual host uses RealIP protocol.

func RealIP

func RealIP(addr string, clientAddr net.Addr) string

RealIP formats host addr to use the RealIP protocol with the given client ip.

func ResolveStatusResponse added in v0.26.0

func ResolveStatusResponse(
	dialTimeout time.Duration,
	routes []config.Route,
	log logr.Logger,
	client netmc.MinecraftConn,
	handshake *packet.Handshake,
	handshakeCtx *proto.PacketContext,
	statusRequestCtx *proto.PacketContext,
) (logr.Logger, *packet.StatusResponse, error)

ResolveStatusResponse resolves the status response for the matching route and caches it for a short time.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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