v2rayhttp

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: GPL-2.0 Imports: 20 Imported by: 8

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.V2RayHTTPOptions, 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 HTTPConn

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

func (*HTTPConn) Close

func (c *HTTPConn) Close() error

func (*HTTPConn) LocalAddr

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

func (*HTTPConn) Read

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

func (*HTTPConn) RemoteAddr

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

func (*HTTPConn) SetDeadline

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

func (*HTTPConn) SetReadDeadline

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

func (*HTTPConn) SetWriteDeadline

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

func (*HTTPConn) Write

func (c *HTTPConn) 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.V2RayHTTPOptions, 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 ServerHTTPConn

type ServerHTTPConn struct {
	HTTPConn
	// contains filtered or unexported fields
}

func (*ServerHTTPConn) Write

func (c *ServerHTTPConn) 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