v2raywebsocket

package
v0.0.0-...-6478c7e Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: GPL-2.0 Imports: 28 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, error)

Types

type Client

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

func (*Client) Close

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

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

func NewConn

func NewConn(conn net.Conn, remoteAddr net.Addr, state ws.State) *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) Write

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

type Writer

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

func NewWriter

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

func (*Writer) FrontHeadroom

func (w *Writer) FrontHeadroom() int

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