spectrum

package module
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 6 Imported by: 0

README

Spectrum

Spectrum is a blazingly fast, lightweight, and easy to use Minecraft: Bedrock Edition proxy.

Discord

Examples

Explore how to use Spectrum in the example directory.

Implementations

Spectrum's protocol uses TCP and QUIC instead of RakNet and the standard Minecraft protocol, providing better reliability and performance. Check out compatible implementations:

Usage

API

Spectrum offers an external TCP service for communication between downstream servers and the proxy. This versatile service supports tasks like player transfers and kicks, using packets for efficient data exchange. For guidance, see this example. Official implementations also include an API client for easy integration.

Discovery

Spectrum introduces Discovery, a method for server determination when players join. It handles connections asynchronously, determining the server address for connection or signaling disconnection errors. This process allows for blocking operations like database queries and HTTP requests. In addition, Spectrum offers an in-built static discovery that maintains a constant server address. Furthermore, the discovery feature can also function as a server load balancer.

Processor

The Processor interface in Spectrum handles incoming and outgoing packets within sessions, enabling custom filtering and manipulation. This functionality supports implementing anti-cheat measures and other security features. Downstream servers are responsible for prefixing packets to indicate decoding necessity, as per Spectrum protocol specifications.

Why Spectrum?

  1. Protocol Innovation: Utilizes TCP and QUIC for enhanced reliability and performance, unlike traditional proxies relying on RakNet and standard Minecraft protocol.

  2. Efficient Packet Handling: Maintains high throughput by bypassing unnecessary packet decoding, optimizing data transmission and reducing latency.

  3. Customizability: Provides extensive customization options, including defining transfer transitions and custom behaviors, for unique gameplay experiences.

  4. Lightweight and Fast: Built for high performance with a lightweight architecture, capable of handling various connection loads efficiently.

  5. Stateless: Simplifies scalability with a stateless design, enhancing flexibility and efficiency in server management by not keeping track of registered servers within the proxy. Transfer between servers is as easy as sending Spectrum's transfer packet to the player from downstream servers.

  6. Deterministic: Takes a unique approach by sidestepping entity translations altogether, relying solely on deterministic entity identifiers provided by the downstream servers.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Spectrum

type Spectrum struct {
	// contains filtered or unexported fields
}

func NewSpectrum

func NewSpectrum(discovery server.Discovery, logger internal.Logger, opts *util.Opts, transport tr.Transport) *Spectrum

func (*Spectrum) Accept

func (s *Spectrum) Accept() (*session.Session, error)

func (*Spectrum) Close

func (s *Spectrum) Close() error

func (*Spectrum) Discovery added in v0.0.13

func (s *Spectrum) Discovery() server.Discovery

func (*Spectrum) Listen

func (s *Spectrum) Listen(config minecraft.ListenConfig) (err error)

func (*Spectrum) Opts added in v0.0.13

func (s *Spectrum) Opts() *util.Opts

func (*Spectrum) Registry

func (s *Spectrum) Registry() *session.Registry

func (*Spectrum) Transport added in v0.0.13

func (s *Spectrum) Transport() tr.Transport

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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