Documentation ¶
Overview ¶
Package websocket implements Websocket transport
Websocket transport implements an HTTP(S) compliable, surveillance proof transport method with plausible deniability.
Index ¶
- func Dial(ctx context.Context, dest net.Destination) (internet.Connection, error)
- func ListenWS(ctx context.Context, address net.Address, port net.Port, ...) (internet.Listener, error)
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetHeader() []*Header
- func (c *Config) GetNormalizedPath() string
- func (m *Config) GetPath() string
- func (c *Config) GetRequestHeader() http.Header
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- func (m *Config) XXX_DiscardUnknown()
- func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Config) XXX_Merge(src proto.Message)
- func (m *Config) XXX_Size() int
- func (m *Config) XXX_Unmarshal(b []byte) error
- type Header
- func (*Header) Descriptor() ([]byte, []int)
- func (m *Header) GetKey() string
- func (m *Header) GetValue() string
- func (*Header) ProtoMessage()
- func (m *Header) Reset()
- func (m *Header) String() string
- func (m *Header) XXX_DiscardUnknown()
- func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Header) XXX_Merge(src proto.Message)
- func (m *Header) XXX_Size() int
- func (m *Header) XXX_Unmarshal(b []byte) error
- type Listener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
func Dial(ctx context.Context, dest net.Destination) (internet.Connection, error)
Dial dials a WebSocket connection to the given destination.
Types ¶
type Config ¶
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 ¶
func (*Config) GetNormalizedPath ¶ added in v3.17.1
func (*Config) GetRequestHeader ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) XXX_DiscardUnknown ¶ added in v3.23.1
func (m *Config) XXX_DiscardUnknown()
func (*Config) XXX_Marshal ¶ added in v3.23.1
func (*Config) XXX_Unmarshal ¶ added in v3.23.1
type Header ¶
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 ¶
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (*Header) XXX_DiscardUnknown ¶ added in v3.23.1
func (m *Header) XXX_DiscardUnknown()
func (*Header) XXX_Marshal ¶ added in v3.23.1
func (*Header) XXX_Unmarshal ¶ added in v3.23.1
Click to show internal directories.
Click to hide internal directories.