Documentation ¶
Index ¶
Constants ¶
View Source
const (
HeaderSize = 64
)
Variables ¶
View Source
var File_proxy_mtproto_config_proto protoreflect.FileDescriptor
Functions ¶
func ContextWithSessionContext ¶
func ContextWithSessionContext(ctx context.Context, c SessionContext) context.Context
Types ¶
type Account ¶
type Account struct { Secret []byte `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` // contains filtered or unexported fields }
func (*Account) Descriptor
deprecated
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶
func (x *Account) ProtoReflect() protoreflect.Message
type Authentication ¶
type Authentication struct { Header [HeaderSize]byte DecodingKey [32]byte EncodingKey [32]byte DecodingNonce [16]byte EncodingNonce [16]byte }
func NewAuthentication ¶
func NewAuthentication(sc SessionContext) *Authentication
func ReadAuthentication ¶
func ReadAuthentication(reader io.Reader) (*Authentication, error)
func (*Authentication) ApplySecret ¶
func (a *Authentication) ApplySecret(b []byte)
func (*Authentication) ConnectionType ¶
func (a *Authentication) ConnectionType() [4]byte
func (*Authentication) DataCenterID ¶
func (a *Authentication) DataCenterID() uint16
type ClientConfig ¶
type ClientConfig struct {
// contains filtered or unexported fields
}
func (*ClientConfig) Descriptor
deprecated
func (*ClientConfig) Descriptor() ([]byte, []int)
Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
func (*ClientConfig) ProtoMessage ¶
func (*ClientConfig) ProtoMessage()
func (*ClientConfig) ProtoReflect ¶
func (x *ClientConfig) ProtoReflect() protoreflect.Message
func (*ClientConfig) Reset ¶
func (x *ClientConfig) Reset()
func (*ClientConfig) String ¶
func (x *ClientConfig) String() string
type ServerConfig ¶
type ServerConfig struct { // User is a list of users that allowed to connect to this inbound. // Although this is a repeated field, only the first user is effective for // now. User []*protocol.User `protobuf:"bytes,1,rep,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*ServerConfig) Descriptor
deprecated
func (*ServerConfig) Descriptor() ([]byte, []int)
Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead.
func (*ServerConfig) GetUser ¶
func (x *ServerConfig) GetUser() []*protocol.User
func (*ServerConfig) ProtoMessage ¶
func (*ServerConfig) ProtoMessage()
func (*ServerConfig) ProtoReflect ¶
func (x *ServerConfig) ProtoReflect() protoreflect.Message
func (*ServerConfig) Reset ¶
func (x *ServerConfig) Reset()
func (*ServerConfig) String ¶
func (x *ServerConfig) String() string
type SessionContext ¶
func DefaultSessionContext ¶
func DefaultSessionContext() SessionContext
func SessionContextFromContext ¶
func SessionContextFromContext(ctx context.Context) SessionContext
Click to show internal directories.
Click to hide internal directories.