websocket

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2026 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package websocket implements Websocket transport

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(ctx context.Context, dest net.Destination, config *WebsocketConfig,
	securityConfig security.Engine, so i.Dialer) (net.Conn, error)

Dial dials a WebSocket connection to the given destination.

func NewWebsocketDialer

func NewWebsocketDialer(config *WebsocketConfig, engine security.Engine, socketConfig i.Dialer) *websocketDialer

Types

type DelayedDialer

type DelayedDialer interface {
	Dial(earlyData []byte) (*websocket.Conn, error)
}

type DelayedDialerForwarded

type DelayedDialerForwarded interface {
	Dial(earlyData []byte) (io.ReadWriteCloser, error)
}
type Header = wspb.Header

type Listener

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

func Listen

func Listen(ctx context.Context, addr net.Destination,
	config *WebsocketConfig, li i.Listener, ch func(net.Conn)) (*Listener, error)

func (*Listener) Addr

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

Addr implements net.Listener.Addr().

func (*Listener) Close

func (ln *Listener) Close() error

Close implements net.Listener.Close().

type WebsocketConfig

type WebsocketConfig = wspb.WebsocketConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL