reality

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRealityClient

func NewRealityClient(config *protocol.Protocol_Reality) protocol.WrapProxy

Types

type RealityClient

type RealityClient struct {
	netapi.EmptyDispatch

	// TODO: remove debug log
	Deubg bool
	// contains filtered or unexported fields
}

func (*RealityClient) ClientHandshake

func (e *RealityClient) ClientHandshake(ctx context.Context, conn net.Conn) (net.Conn, error)

func (*RealityClient) Conn

func (e *RealityClient) Conn(ctx context.Context, addr netapi.Address) (net.Conn, error)

func (*RealityClient) PacketConn

func (e *RealityClient) PacketConn(ctx context.Context, addr netapi.Address) (net.PacketConn, error)

type Server

type Server struct {
	net.Listener
}

func NewServer

func NewServer(lis net.Listener, config ServerConfig) (*Server, error)

type ServerConfig

type ServerConfig struct {
	ShortID     []string // "0123456789abcdef", ""
	ServerNames []string
	Dest        string
	PrivateKey  []byte
	Debug       bool
}

func (*ServerConfig) ServerNameMap

func (s *ServerConfig) ServerNameMap() map[string]bool

func (*ServerConfig) ShortIDMap

func (s *ServerConfig) ShortIDMap() (map[[8]byte]bool, error)

Jump to

Keyboard shortcuts

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