v2raywebsocket

package
v1.10.0-alpha.24 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: GPL-2.0 Imports: 28 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, options option.V2RayWebsocketOptions, tlsConfig tls.Config) (adapter.V2RayClientTransport, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) Close added in v1.9.4

func (c *Client) Close() error

func (*Client) DialContext

func (c *Client) DialContext(ctx context.Context) (net.Conn, error)

type EarlyWebsocketConn

type EarlyWebsocketConn struct {
	*Client
	// contains filtered or unexported fields
}

func (*EarlyWebsocketConn) Close

func (c *EarlyWebsocketConn) Close() error

func (*EarlyWebsocketConn) LazyHeadroom added in v1.1.0

func (c *EarlyWebsocketConn) LazyHeadroom() bool

func (*EarlyWebsocketConn) LocalAddr

func (c *EarlyWebsocketConn) LocalAddr() net.Addr

func (*EarlyWebsocketConn) NeedAdditionalReadDeadline added in v1.2.5

func (c *EarlyWebsocketConn) NeedAdditionalReadDeadline() bool

func (*EarlyWebsocketConn) Read

func (c *EarlyWebsocketConn) Read(b []byte) (n int, err error)

func (*EarlyWebsocketConn) RemoteAddr

func (c *EarlyWebsocketConn) RemoteAddr() net.Addr

func (*EarlyWebsocketConn) SetDeadline

func (c *EarlyWebsocketConn) SetDeadline(t time.Time) error

func (*EarlyWebsocketConn) SetReadDeadline

func (c *EarlyWebsocketConn) SetReadDeadline(t time.Time) error

func (*EarlyWebsocketConn) SetWriteDeadline

func (c *EarlyWebsocketConn) SetWriteDeadline(t time.Time) error

func (*EarlyWebsocketConn) Upstream added in v1.1.0

func (c *EarlyWebsocketConn) Upstream() any

func (*EarlyWebsocketConn) Write

func (c *EarlyWebsocketConn) Write(b []byte) (n int, err error)

func (*EarlyWebsocketConn) WriteBuffer added in v1.1.0

func (c *EarlyWebsocketConn) WriteBuffer(buffer *buf.Buffer) error

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (*Server) Close

func (s *Server) Close() error

func (*Server) Network

func (s *Server) Network() []string

func (*Server) Serve

func (s *Server) Serve(listener net.Listener) error

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(writer http.ResponseWriter, request *http.Request)

func (*Server) ServePacket

func (s *Server) ServePacket(listener net.PacketConn) error

type WebsocketConn

type WebsocketConn struct {
	net.Conn
	*Writer
	// contains filtered or unexported fields
}

func NewConn added in v1.7.0

func NewConn(conn net.Conn, remoteAddr net.Addr, state ws.State) *WebsocketConn

func (*WebsocketConn) Close

func (c *WebsocketConn) Close() error

func (*WebsocketConn) NeedAdditionalReadDeadline added in v1.2.5

func (c *WebsocketConn) NeedAdditionalReadDeadline() bool

func (*WebsocketConn) Read

func (c *WebsocketConn) Read(b []byte) (n int, err error)

func (*WebsocketConn) RemoteAddr

func (c *WebsocketConn) RemoteAddr() net.Addr

func (*WebsocketConn) SetDeadline

func (c *WebsocketConn) SetDeadline(t time.Time) error

func (*WebsocketConn) SetReadDeadline added in v1.2.4

func (c *WebsocketConn) SetReadDeadline(t time.Time) error

func (*WebsocketConn) SetWriteDeadline added in v1.2.4

func (c *WebsocketConn) SetWriteDeadline(t time.Time) error

func (*WebsocketConn) Upstream added in v1.1.0

func (c *WebsocketConn) Upstream() any

func (*WebsocketConn) Write

func (c *WebsocketConn) Write(p []byte) (n int, err error)

type Writer added in v1.1.0

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter added in v1.1.0

func NewWriter(writer io.Writer, state ws.State) *Writer

func (*Writer) FrontHeadroom added in v1.1.0

func (w *Writer) FrontHeadroom() int

func (*Writer) WriteBuffer added in v1.1.0

func (w *Writer) WriteBuffer(buffer *buf.Buffer) error

Jump to

Keyboard shortcuts

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