Documentation
¶
Index ¶
- Variables
- func KeyLogWriterFromConfig(c *RealityConfig) io.Writer
- func UClient(c net.Conn, config *RealityConfig, ctx context.Context, dest net.Destination) (net.Conn, error)
- type Conn
- type Engine
- type RealityConfig
- func (*RealityConfig) Descriptor() ([]byte, []int)deprecated
- func (x *RealityConfig) GetDest() string
- func (x *RealityConfig) GetFingerprint() string
- func (x *RealityConfig) GetMasterKeyLog() string
- func (x *RealityConfig) GetMaxClientVer() []byte
- func (x *RealityConfig) GetMaxTimeDiff() uint64
- func (x *RealityConfig) GetMinClientVer() []byte
- func (x *RealityConfig) GetPbk() string
- func (x *RealityConfig) GetPrivateKey() []byte
- func (x *RealityConfig) GetPublicKey() []byte
- func (c *RealityConfig) GetREALITYConfig() *reality.Config
- func (x *RealityConfig) GetServerName() string
- func (x *RealityConfig) GetServerNames() []string
- func (x *RealityConfig) GetShortId() []byte
- func (x *RealityConfig) GetShortIds() [][]byte
- func (x *RealityConfig) GetShow() bool
- func (x *RealityConfig) GetSid() string
- func (x *RealityConfig) GetSpiderX() string
- func (x *RealityConfig) GetSpiderY() []int64
- func (x *RealityConfig) GetXver() uint64
- func (*RealityConfig) ProtoMessage()
- func (x *RealityConfig) ProtoReflect() protoreflect.Message
- func (x *RealityConfig) Reset()
- func (x *RealityConfig) String() string
- type UConn
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version_x byte = 25 Version_y byte = 5 Version_z byte = 16 )
View Source
var File_transport_security_reality_config_proto protoreflect.FileDescriptor
Functions ¶
func KeyLogWriterFromConfig ¶
func KeyLogWriterFromConfig(c *RealityConfig) io.Writer
Types ¶
type Engine ¶
type Engine struct {
Config *RealityConfig
}
func NewEngine ¶
func NewEngine(config *RealityConfig) (*Engine, error)
func (*Engine) GetClientConn ¶
type RealityConfig ¶
type RealityConfig struct {
Show bool `protobuf:"varint,1,opt,name=show,proto3" json:"show,omitempty"`
// server only
Dest string `protobuf:"bytes,2,opt,name=dest,proto3" json:"dest,omitempty"`
// string type = 3;
// server only
Xver uint64 `protobuf:"varint,4,opt,name=xver,proto3" json:"xver,omitempty"`
// server only
ServerNames []string `protobuf:"bytes,5,rep,name=server_names,json=serverNames,proto3" json:"server_names,omitempty"`
// server only
PrivateKey []byte `protobuf:"bytes,6,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
// server only
MinClientVer []byte `protobuf:"bytes,7,opt,name=min_client_ver,json=minClientVer,proto3" json:"min_client_ver,omitempty"`
// server only
MaxClientVer []byte `protobuf:"bytes,8,opt,name=max_client_ver,json=maxClientVer,proto3" json:"max_client_ver,omitempty"`
// server only
// miliseconds
MaxTimeDiff uint64 `protobuf:"varint,9,opt,name=max_time_diff,json=maxTimeDiff,proto3" json:"max_time_diff,omitempty"`
// server only
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"`
Pbk string `protobuf:"bytes,28,opt,name=pbk,proto3" json:"pbk,omitempty"`
// must be 8 bytes
Sid string `protobuf:"bytes,29,opt,name=sid,proto3" json:"sid,omitempty"`
SpiderX string `protobuf:"bytes,25,opt,name=spider_x,json=spiderX,proto3" json:"spider_x,omitempty"`
MasterKeyLog string `protobuf:"bytes,27,opt,name=master_key_log,json=masterKeyLog,proto3" json:"master_key_log,omitempty"`
ShortId []byte `protobuf:"bytes,24,opt,name=short_id,json=shortId,proto3" json:"short_id,omitempty"`
SpiderY []int64 `protobuf:"varint,26,rep,packed,name=spider_y,json=spiderY,proto3" json:"spider_y,omitempty"`
PublicKey []byte `protobuf:"bytes,23,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
// contains filtered or unexported fields
}
func (*RealityConfig) Descriptor
deprecated
func (*RealityConfig) Descriptor() ([]byte, []int)
Deprecated: Use RealityConfig.ProtoReflect.Descriptor instead.
func (*RealityConfig) GetDest ¶
func (x *RealityConfig) GetDest() string
func (*RealityConfig) GetFingerprint ¶
func (x *RealityConfig) GetFingerprint() string
func (*RealityConfig) GetMasterKeyLog ¶
func (x *RealityConfig) GetMasterKeyLog() string
func (*RealityConfig) GetMaxClientVer ¶
func (x *RealityConfig) GetMaxClientVer() []byte
func (*RealityConfig) GetMaxTimeDiff ¶
func (x *RealityConfig) GetMaxTimeDiff() uint64
func (*RealityConfig) GetMinClientVer ¶
func (x *RealityConfig) GetMinClientVer() []byte
func (*RealityConfig) GetPbk ¶
func (x *RealityConfig) GetPbk() string
func (*RealityConfig) GetPrivateKey ¶
func (x *RealityConfig) GetPrivateKey() []byte
func (*RealityConfig) GetPublicKey ¶
func (x *RealityConfig) GetPublicKey() []byte
func (*RealityConfig) GetREALITYConfig ¶
func (c *RealityConfig) GetREALITYConfig() *reality.Config
func (*RealityConfig) GetServerName ¶
func (x *RealityConfig) GetServerName() string
func (*RealityConfig) GetServerNames ¶
func (x *RealityConfig) GetServerNames() []string
func (*RealityConfig) GetShortId ¶
func (x *RealityConfig) GetShortId() []byte
func (*RealityConfig) GetShortIds ¶
func (x *RealityConfig) GetShortIds() [][]byte
func (*RealityConfig) GetShow ¶
func (x *RealityConfig) GetShow() bool
func (*RealityConfig) GetSid ¶
func (x *RealityConfig) GetSid() string
func (*RealityConfig) GetSpiderX ¶
func (x *RealityConfig) GetSpiderX() string
func (*RealityConfig) GetSpiderY ¶
func (x *RealityConfig) GetSpiderY() []int64
func (*RealityConfig) GetXver ¶
func (x *RealityConfig) GetXver() uint64
func (*RealityConfig) ProtoMessage ¶
func (*RealityConfig) ProtoMessage()
func (*RealityConfig) ProtoReflect ¶
func (x *RealityConfig) ProtoReflect() protoreflect.Message
func (*RealityConfig) Reset ¶
func (x *RealityConfig) Reset()
func (*RealityConfig) String ¶
func (x *RealityConfig) String() string
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 (*UConn) VerifyPeerCertificate ¶
func (c *UConn) VerifyPeerCertificate(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error
Click to show internal directories.
Click to hide internal directories.