reality

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: AGPL-3.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version_x byte = 25
	Version_y byte = 5
	Version_z byte = 16
)

Functions

func GetREALITYConfig added in v1.1.2

func GetREALITYConfig(c *RealityConfig) *reality.Config

func KeyLogWriterFromConfig

func KeyLogWriterFromConfig(c *RealityConfig) io.Writer

func UClient

func UClient(c net.Conn, config *RealityConfig, ctx context.Context, dest net.Destination) (net.Conn, error)

Types

type Conn

type Conn struct {
	*reality.Conn
}

func Server

func Server(c net.Conn, config *reality.Config) (*Conn, error)

func (*Conn) GetConnectionApplicationProtocol

func (c *Conn) GetConnectionApplicationProtocol() (string, error)

func (*Conn) HandshakeAddress

func (c *Conn) HandshakeAddress() net.Address

type Engine

type Engine struct {
	Config *RealityConfig
}

func NewEngine

func NewEngine(config *RealityConfig) (*Engine, error)

func (*Engine) GetClientConn

func (c *Engine) GetClientConn(conn net.Conn, opts ...security.Option) (net.Conn, error)

func (*Engine) GetTLSConfig

func (c *Engine) GetTLSConfig(_ ...security.Option) *gotls.Config

func (*Engine) Listener

func (c *Engine) Listener(l net.Listener) net.Listener

type RealityConfig

type RealityConfig = realpb.RealityConfig

type UConn

type UConn struct {
	*utls.UConn
	ServerName string
	// a shared secret that is used to encrypt
	AuthKey  []byte
	Verified bool
}

func (*UConn) HandshakeAddress

func (c *UConn) HandshakeAddress() net.Address

func (*UConn) VerifyPeerCertificate

func (c *UConn) VerifyPeerCertificate(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error

Jump to

Keyboard shortcuts

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