lite

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 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, route *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 IsTCPShieldRealIP added in v0.36.2

func IsTCPShieldRealIP(addr string) bool

IsTCPShieldRealIP returns true if the given virtual host uses TCPShieldRealIP protocol.

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.

func TCPShieldRealIP added in v0.36.2

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

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

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