Versions in this module Expand all Collapse all v4 v4.23.2 Apr 17, 2020 Changes in this version + const AuthSize + const RequestOptionOneTimeAuth + const Version + var Account_OneTimeAuth_name = map[int32]string + var Account_OneTimeAuth_value = map[string]int32 + var CipherType_name = map[int32]string + var CipherType_value = map[string]int32 + func ChunkKeyGenerator(iv []byte) func() []byte + func DecodeUDPPacket(user *protocol.MemoryUser, payload *buf.Buffer) (*protocol.RequestHeader, *buf.Buffer, error) + func EncodeUDPPacket(request *protocol.RequestHeader, payload []byte) (*buf.Buffer, error) + func HeaderKeyGenerator(key []byte, iv []byte) func() []byte + func ReadTCPResponse(user *protocol.MemoryUser, reader io.Reader) (buf.Reader, error) + func ReadTCPSession(user *protocol.MemoryUser, reader io.Reader) (*protocol.RequestHeader, buf.Reader, error) + func WriteTCPRequest(request *protocol.RequestHeader, writer io.Writer) (buf.Writer, error) + func WriteTCPResponse(request *protocol.RequestHeader, writer io.Writer) (buf.Writer, error) + type AEADCipher struct + AEADAuthCreator func(key []byte) cipher.AEAD + IVBytes int32 + KeyBytes int32 + func (*AEADCipher) IsAEAD() bool + func (c *AEADCipher) DecodePacket(key []byte, b *buf.Buffer) error + func (c *AEADCipher) EncodePacket(key []byte, b *buf.Buffer) error + func (c *AEADCipher) IVSize() int32 + func (c *AEADCipher) KeySize() int32 + func (c *AEADCipher) NewDecryptionReader(key []byte, iv []byte, reader io.Reader) (buf.Reader, error) + func (c *AEADCipher) NewEncryptionWriter(key []byte, iv []byte, writer io.Writer) (buf.Writer, error) + type Account struct + CipherType CipherType + Ota Account_OneTimeAuth + Password string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Account) Descriptor() ([]byte, []int) + func (*Account) ProtoMessage() + func (a *Account) AsAccount() (protocol.Account, error) + func (m *Account) GetCipherType() CipherType + func (m *Account) GetOta() Account_OneTimeAuth + func (m *Account) GetPassword() string + func (m *Account) Reset() + func (m *Account) String() string + func (m *Account) XXX_DiscardUnknown() + func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Account) XXX_Merge(src proto.Message) + func (m *Account) XXX_Size() int + func (m *Account) XXX_Unmarshal(b []byte) error + type Account_OneTimeAuth int32 + const Account_Auto + const Account_Disabled + const Account_Enabled + func (Account_OneTimeAuth) EnumDescriptor() ([]byte, []int) + func (x Account_OneTimeAuth) String() string + type AesCfb struct + KeyBytes int32 + func (*AesCfb) IsAEAD() bool + func (v *AesCfb) DecodePacket(key []byte, b *buf.Buffer) error + func (v *AesCfb) EncodePacket(key []byte, b *buf.Buffer) error + func (v *AesCfb) IVSize() int32 + func (v *AesCfb) KeySize() int32 + func (v *AesCfb) NewDecryptionReader(key []byte, iv []byte, reader io.Reader) (buf.Reader, error) + func (v *AesCfb) NewEncryptionWriter(key []byte, iv []byte, writer io.Writer) (buf.Writer, error) + type Authenticator struct + func NewAuthenticator(keygen KeyGenerator) *Authenticator + func (v *Authenticator) Authenticate(data []byte, dest []byte) + type ChaCha20 struct + IVBytes int32 + func (*ChaCha20) IsAEAD() bool + func (v *ChaCha20) DecodePacket(key []byte, b *buf.Buffer) error + func (v *ChaCha20) EncodePacket(key []byte, b *buf.Buffer) error + func (v *ChaCha20) IVSize() int32 + func (v *ChaCha20) KeySize() int32 + func (v *ChaCha20) NewDecryptionReader(key []byte, iv []byte, reader io.Reader) (buf.Reader, error) + func (v *ChaCha20) NewEncryptionWriter(key []byte, iv []byte, writer io.Writer) (buf.Writer, error) + type ChunkReader struct + func NewChunkReader(reader io.Reader, auth *Authenticator) *ChunkReader + func (v *ChunkReader) ReadMultiBuffer() (buf.MultiBuffer, error) + type ChunkWriter struct + func NewChunkWriter(writer io.Writer, auth *Authenticator) *ChunkWriter + func (w *ChunkWriter) WriteMultiBuffer(mb buf.MultiBuffer) error + type Cipher interface + DecodePacket func(key []byte, b *buf.Buffer) error + EncodePacket func(key []byte, b *buf.Buffer) error + IVSize func() int32 + IsAEAD func() bool + KeySize func() int32 + NewDecryptionReader func(key []byte, iv []byte, reader io.Reader) (buf.Reader, error) + NewEncryptionWriter func(key []byte, iv []byte, writer io.Writer) (buf.Writer, error) + type CipherType int32 + const CipherType_AES_128_CFB + const CipherType_AES_128_GCM + const CipherType_AES_256_CFB + const CipherType_AES_256_GCM + const CipherType_CHACHA20 + const CipherType_CHACHA20_IETF + const CipherType_CHACHA20_POLY1305 + const CipherType_NONE + const CipherType_UNKNOWN + func (CipherType) EnumDescriptor() ([]byte, []int) + func (x CipherType) String() string + type Client struct + func NewClient(ctx context.Context, config *ClientConfig) (*Client, error) + func (c *Client) Process(ctx context.Context, link *transport.Link, dialer internet.Dialer) error + type ClientConfig struct + Server []*protocol.ServerEndpoint + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*ClientConfig) Descriptor() ([]byte, []int) + func (*ClientConfig) ProtoMessage() + func (m *ClientConfig) GetServer() []*protocol.ServerEndpoint + func (m *ClientConfig) Reset() + func (m *ClientConfig) String() string + func (m *ClientConfig) XXX_DiscardUnknown() + func (m *ClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ClientConfig) XXX_Merge(src proto.Message) + func (m *ClientConfig) XXX_Size() int + func (m *ClientConfig) XXX_Unmarshal(b []byte) error + type KeyGenerator func() []byte + type MemoryAccount struct + Cipher Cipher + Key []byte + OneTimeAuth Account_OneTimeAuth + func (a *MemoryAccount) Equals(another protocol.Account) bool + type NoneCipher struct + func (NoneCipher) DecodePacket(key []byte, b *buf.Buffer) error + func (NoneCipher) EncodePacket(key []byte, b *buf.Buffer) error + func (NoneCipher) IVSize() int32 + func (NoneCipher) IsAEAD() bool + func (NoneCipher) KeySize() int32 + func (NoneCipher) NewDecryptionReader(key []byte, iv []byte, reader io.Reader) (buf.Reader, error) + func (NoneCipher) NewEncryptionWriter(key []byte, iv []byte, writer io.Writer) (buf.Writer, error) + type Server struct + func NewServer(ctx context.Context, config *ServerConfig) (*Server, error) + func (s *Server) Network() []net.Network + func (s *Server) Process(ctx context.Context, network net.Network, conn internet.Connection, ...) error + type ServerConfig struct + Network []net.Network + UdpEnabled bool + User *protocol.User + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*ServerConfig) Descriptor() ([]byte, []int) + func (*ServerConfig) ProtoMessage() + func (m *ServerConfig) GetNetwork() []net.Network + func (m *ServerConfig) GetUdpEnabled() bool + func (m *ServerConfig) GetUser() *protocol.User + func (m *ServerConfig) Reset() + func (m *ServerConfig) String() string + func (m *ServerConfig) XXX_DiscardUnknown() + func (m *ServerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ServerConfig) XXX_Merge(src proto.Message) + func (m *ServerConfig) XXX_Size() int + func (m *ServerConfig) XXX_Unmarshal(b []byte) error + type UDPReader struct + Reader io.Reader + User *protocol.MemoryUser + func (v *UDPReader) ReadMultiBuffer() (buf.MultiBuffer, error) + type UDPWriter struct + Request *protocol.RequestHeader + Writer io.Writer + func (w *UDPWriter) Write(payload []byte) (int, error) Other modules containing this package github.com/unifyproxy/v2ray-core