v2raywebsocket

package
v1.3.1-beta.3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: GPL-2.0 Imports: 26 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

Types

type Client

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

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 {
	*websocket.Conn
	*Writer
	// contains filtered or unexported fields
}

func NewServerConn added in v1.1.0

func NewServerConn(wsConn *websocket.Conn, remoteAddr net.Addr) *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) UpstreamWriter added in v1.1.0

func (c *WebsocketConn) UpstreamWriter() any

type Writer added in v1.1.0

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

func NewWriter added in v1.1.0

func NewWriter(conn *websocket.Conn, isServer bool) *Writer

func (*Writer) FrontHeadroom added in v1.1.0

func (w *Writer) FrontHeadroom() int

func (*Writer) Upstream added in v1.1.0

func (w *Writer) Upstream() any

func (*Writer) Write added in v1.1.0

func (w *Writer) Write(p []byte) (n int, err error)

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