reality

package
v0.0.0-...-fa78f26 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MPL-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_transport_internet_reality_config_proto protoreflect.FileDescriptor

Functions

func Server

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

func UClient

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

Types

type Config

type Config struct {
	Show         bool     `protobuf:"varint,1,opt,name=show,proto3" json:"show,omitempty"`
	Dest         string   `protobuf:"bytes,2,opt,name=dest,proto3" json:"dest,omitempty"`
	Type         string   `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	Xver         uint64   `protobuf:"varint,4,opt,name=xver,proto3" json:"xver,omitempty"`
	ServerNames  []string `protobuf:"bytes,5,rep,name=server_names,json=serverNames,proto3" json:"server_names,omitempty"`
	PrivateKey   []byte   `protobuf:"bytes,6,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
	MinClientVer []byte   `protobuf:"bytes,7,opt,name=min_client_ver,json=minClientVer,proto3" json:"min_client_ver,omitempty"`
	MaxClientVer []byte   `protobuf:"bytes,8,opt,name=max_client_ver,json=maxClientVer,proto3" json:"max_client_ver,omitempty"`
	MaxTimeDiff  uint64   `protobuf:"varint,9,opt,name=max_time_diff,json=maxTimeDiff,proto3" json:"max_time_diff,omitempty"`
	ShortIds     [][]byte `protobuf:"bytes,10,rep,name=short_ids,json=shortIds,proto3" json:"short_ids,omitempty"`
	Fingerprint  string   `protobuf:"bytes,21,opt,name=Fingerprint,proto3" json:"Fingerprint,omitempty"`
	ServerName   string   `protobuf:"bytes,22,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"`
	PublicKey    []byte   `protobuf:"bytes,23,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	ShortId      []byte   `protobuf:"bytes,24,opt,name=short_id,json=shortId,proto3" json:"short_id,omitempty"`
	SpiderX      string   `protobuf:"bytes,25,opt,name=spider_x,json=spiderX,proto3" json:"spider_x,omitempty"`
	SpiderY      []int64  `protobuf:"varint,26,rep,packed,name=spider_y,json=spiderY,proto3" json:"spider_y,omitempty"`
	// contains filtered or unexported fields
}

func ConfigFromStreamSettings

func ConfigFromStreamSettings(settings *internet.MemoryStreamConfig) *Config

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetDest

func (x *Config) GetDest() string

func (*Config) GetFingerprint

func (x *Config) GetFingerprint() string

func (*Config) GetMaxClientVer

func (x *Config) GetMaxClientVer() []byte

func (*Config) GetMaxTimeDiff

func (x *Config) GetMaxTimeDiff() uint64

func (*Config) GetMinClientVer

func (x *Config) GetMinClientVer() []byte

func (*Config) GetPrivateKey

func (x *Config) GetPrivateKey() []byte

func (*Config) GetPublicKey

func (x *Config) GetPublicKey() []byte

func (*Config) GetREALITYConfig

func (c *Config) GetREALITYConfig() *reality.Config

func (*Config) GetServerName

func (x *Config) GetServerName() string

func (*Config) GetServerNames

func (x *Config) GetServerNames() []string

func (*Config) GetShortId

func (x *Config) GetShortId() []byte

func (*Config) GetShortIds

func (x *Config) GetShortIds() [][]byte

func (*Config) GetShow

func (x *Config) GetShow() bool

func (*Config) GetSpiderX

func (x *Config) GetSpiderX() string

func (*Config) GetSpiderY

func (x *Config) GetSpiderY() []int64

func (*Config) GetType

func (x *Config) GetType() string

func (*Config) GetXver

func (x *Config) GetXver() uint64

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Conn

type Conn struct {
	*reality.Conn
}

func (*Conn) HandshakeAddress

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

type UConn

type UConn struct {
	*utls.UConn
	ServerName string
	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