v2raywebsocket

package
v0.0.0-...-ab51429 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: GPL-2.0 Imports: 26 Imported by: 0

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

func (c *EarlyWebsocketConn) LazyHeadroom() bool

func (*EarlyWebsocketConn) LocalAddr

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

func (*EarlyWebsocketConn) NeedAdditionalReadDeadline

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

func (c *EarlyWebsocketConn) Upstream() any

func (*EarlyWebsocketConn) Write

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

func (*EarlyWebsocketConn) WriteBuffer

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

func NewServerConn(wsConn *websocket.Conn, remoteAddr net.Addr) *WebsocketConn

func (*WebsocketConn) Close

func (c *WebsocketConn) Close() error

func (*WebsocketConn) NeedAdditionalReadDeadline

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

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

func (*WebsocketConn) SetWriteDeadline

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

func (*WebsocketConn) Upstream

func (c *WebsocketConn) Upstream() any

func (*WebsocketConn) UpstreamWriter

func (c *WebsocketConn) UpstreamWriter() any

type Writer

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

func NewWriter

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

func (*Writer) FrontHeadroom

func (w *Writer) FrontHeadroom() int

func (*Writer) Upstream

func (w *Writer) Upstream() any

func (*Writer) Write

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

func (*Writer) WriteBuffer

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