v2raywebsocket

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: GPL-2.0 Imports: 21 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) LocalAddr

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

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) Write

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

type Server

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

func NewServer

func NewServer(ctx context.Context, options option.V2RayWebsocketOptions, tlsConfig *tls.Config, handler N.TCPConnectionHandler, errorHandler E.Handler) *Server

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
	// contains filtered or unexported fields
}

func (*WebsocketConn) Close

func (c *WebsocketConn) Close() error

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) Write

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

Jump to

Keyboard shortcuts

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