core: v2ray.com/core/transport/internet/websocket Index | Files

package websocket

import "v2ray.com/core/transport/internet/websocket"

Package websocket implements Websocket transport

Websocket transport implements an HTTP(S) compliable, surveillance proof transport method with plausible deniability.

Index

Package Files

config.go config.pb.go connection.go dialer.go errors.generated.go hub.go ws.go

func Dial Uses

func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.MemoryStreamConfig) (internet.Connection, error)

Dial dials a WebSocket connection to the given destination.

func ListenWS Uses

func ListenWS(ctx context.Context, address net.Address, port net.Port, streamSettings *internet.MemoryStreamConfig, addConn internet.ConnHandler) (internet.Listener, error)

type Config Uses

type Config struct {
    // URL path to the WebSocket service. Empty value means root(/).
    Path                 string    `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
    Header               []*Header `protobuf:"bytes,3,rep,name=header,proto3" json:"header,omitempty"`
    XXX_NoUnkeyedLiteral struct{}  `json:"-"`
    XXX_unrecognized     []byte    `json:"-"`
    XXX_sizecache        int32     `json:"-"`
}

func (*Config) Descriptor Uses

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

func (*Config) GetHeader Uses

func (m *Config) GetHeader() []*Header

func (*Config) GetNormalizedPath Uses

func (c *Config) GetNormalizedPath() string

func (*Config) GetPath Uses

func (m *Config) GetPath() string

func (*Config) GetRequestHeader Uses

func (c *Config) GetRequestHeader() http.Header

func (*Config) ProtoMessage Uses

func (*Config) ProtoMessage()

func (*Config) Reset Uses

func (m *Config) Reset()

func (*Config) String Uses

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown Uses

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal Uses

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

func (*Config) XXX_Merge Uses

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

func (*Config) XXX_Size Uses

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal Uses

func (m *Config) XXX_Unmarshal(b []byte) error
type Header struct {
    Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
    Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*Header) Descriptor Uses

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

func (*Header) GetKey Uses

func (m *Header) GetKey() string

func (*Header) GetValue Uses

func (m *Header) GetValue() string

func (*Header) ProtoMessage Uses

func (*Header) ProtoMessage()

func (*Header) Reset Uses

func (m *Header) Reset()

func (*Header) String Uses

func (m *Header) String() string

func (*Header) XXX_DiscardUnknown Uses

func (m *Header) XXX_DiscardUnknown()

func (*Header) XXX_Marshal Uses

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

func (*Header) XXX_Merge Uses

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

func (*Header) XXX_Size Uses

func (m *Header) XXX_Size() int

func (*Header) XXX_Unmarshal Uses

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

type Listener Uses

type Listener struct {
    sync.Mutex
    // contains filtered or unexported fields
}

func (*Listener) Addr Uses

func (ln *Listener) Addr() net.Addr

Addr implements net.Listener.Addr().

func (*Listener) Close Uses

func (ln *Listener) Close() error

Close implements net.Listener.Close().

Package websocket imports 20 packages (graph) and is imported by 6 packages. Updated 2019-07-24. Refresh now. Tools for package owners.