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

Variables

var File_transport_internet_websocket_config_proto protoreflect.FileDescriptor

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"`
    AcceptProxyProtocol bool      `protobuf:"varint,4,opt,name=accept_proxy_protocol,json=acceptProxyProtocol,proto3" json:"accept_proxy_protocol,omitempty"`
    // contains filtered or unexported fields
}

func (*Config) Descriptor Uses

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetAcceptProxyProtocol Uses

func (x *Config) GetAcceptProxyProtocol() bool

func (*Config) GetHeader Uses

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

func (*Config) GetNormalizedPath Uses

func (c *Config) GetNormalizedPath() string

func (*Config) GetPath Uses

func (x *Config) GetPath() string

func (*Config) GetRequestHeader Uses

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

func (*Config) ProtoMessage Uses

func (*Config) ProtoMessage()

func (*Config) ProtoReflect Uses

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset Uses

func (x *Config) Reset()

func (*Config) String Uses

func (x *Config) String() string
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"`
    // contains filtered or unexported fields
}

func (*Header) Descriptor Uses

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

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetKey Uses

func (x *Header) GetKey() string

func (*Header) GetValue Uses

func (x *Header) GetValue() string

func (*Header) ProtoMessage Uses

func (*Header) ProtoMessage()

func (*Header) ProtoReflect Uses

func (x *Header) ProtoReflect() protoreflect.Message

func (*Header) Reset Uses

func (x *Header) Reset()

func (*Header) String Uses

func (x *Header) String() string

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 22 packages (graph) and is imported by 16 packages. Updated 2020-11-12. Refresh now. Tools for package owners.