v2ray-core: github.com/v2ray/v2ray-core/proxy/vless/encoding Index | Files

package encoding

import "github.com/v2ray/v2ray-core/proxy/vless/encoding"


Package Files

addons.go addons.pb.go encoding.go errors.generated.go


const (
    Version = byte(0)


var (
    ErrInvalidLengthAddons        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowAddons          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupAddons = fmt.Errorf("proto: unexpected end of group")

func DecodeBodyAddons Uses

func DecodeBodyAddons(reader io.Reader, request *protocol.RequestHeader, addons *Addons) buf.Reader

DecodeBodyAddons returns a Reader from which caller can fetch decrypted body.

func EncodeBodyAddons Uses

func EncodeBodyAddons(writer io.Writer, request *protocol.RequestHeader, addons *Addons) buf.Writer

EncodeBodyAddons returns a Writer that auto-encrypt content written by caller.

func EncodeHeaderAddons Uses

func EncodeHeaderAddons(buffer *buf.Buffer, addons *Addons) error

func EncodeRequestHeader Uses

func EncodeRequestHeader(writer io.Writer, request *protocol.RequestHeader, requestAddons *Addons) error

EncodeRequestHeader writes encoded request header into the given writer.

func EncodeResponseHeader Uses

func EncodeResponseHeader(writer io.Writer, request *protocol.RequestHeader, responseAddons *Addons) error

EncodeResponseHeader writes encoded response header into the given writer.

type Addons Uses

type Addons struct {
    Flow                 string   `protobuf:"bytes,1,opt,name=Flow,proto3" json:"Flow,omitempty"`
    Seed                 []byte   `protobuf:"bytes,2,opt,name=Seed,proto3" json:"Seed,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`

func DecodeHeaderAddons Uses

func DecodeHeaderAddons(buffer *buf.Buffer, reader io.Reader) (*Addons, error)

func DecodeRequestHeader Uses

func DecodeRequestHeader(isfb bool, first *buf.Buffer, reader io.Reader, validator *vless.Validator) (*protocol.RequestHeader, *Addons, error, bool)

DecodeRequestHeader decodes and returns (if successful) a RequestHeader from an input stream.

func DecodeResponseHeader Uses

func DecodeResponseHeader(reader io.Reader, request *protocol.RequestHeader) (*Addons, error)

DecodeResponseHeader decodes and returns (if successful) a ResponseHeader from an input stream.

func (*Addons) Descriptor Uses

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

func (*Addons) GetFlow Uses

func (m *Addons) GetFlow() string

func (*Addons) GetSeed Uses

func (m *Addons) GetSeed() []byte

func (*Addons) Marshal Uses

func (m *Addons) Marshal() (dAtA []byte, err error)

func (*Addons) MarshalTo Uses

func (m *Addons) MarshalTo(dAtA []byte) (int, error)

func (*Addons) MarshalToSizedBuffer Uses

func (m *Addons) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Addons) ProtoMessage Uses

func (*Addons) ProtoMessage()

func (*Addons) Reset Uses

func (m *Addons) Reset()

func (*Addons) Size Uses

func (m *Addons) Size() (n int)

func (*Addons) String Uses

func (m *Addons) String() string

func (*Addons) Unmarshal Uses

func (m *Addons) Unmarshal(dAtA []byte) error

func (*Addons) XXX_DiscardUnknown Uses

func (m *Addons) XXX_DiscardUnknown()

func (*Addons) XXX_Marshal Uses

func (m *Addons) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Addons) XXX_Merge Uses

func (m *Addons) XXX_Merge(src proto.Message)

func (*Addons) XXX_Size Uses

func (m *Addons) XXX_Size() int

func (*Addons) XXX_Unmarshal Uses

func (m *Addons) XXX_Unmarshal(b []byte) error

type LengthPacketReader Uses

type LengthPacketReader struct {
    // contains filtered or unexported fields

func NewLengthPacketReader Uses

func NewLengthPacketReader(reader io.Reader) *LengthPacketReader

func (*LengthPacketReader) ReadMultiBuffer Uses

func (r *LengthPacketReader) ReadMultiBuffer() (buf.MultiBuffer, error)

type LengthPacketWriter Uses

type LengthPacketWriter struct {
    // contains filtered or unexported fields

func NewLengthPacketWriter Uses

func NewLengthPacketWriter(writer io.Writer) *LengthPacketWriter

func (*LengthPacketWriter) WriteMultiBuffer Uses

func (w *LengthPacketWriter) WriteMultiBuffer(mb buf.MultiBuffer) error

type MultiLengthPacketWriter Uses

type MultiLengthPacketWriter struct {

func NewMultiLengthPacketWriter Uses

func NewMultiLengthPacketWriter(writer buf.Writer) *MultiLengthPacketWriter

func (*MultiLengthPacketWriter) WriteMultiBuffer Uses

func (w *MultiLengthPacketWriter) WriteMultiBuffer(mb buf.MultiBuffer) error

Package encoding imports 10 packages (graph). Updated 2020-11-02. Refresh now. Tools for package owners.