v2rayhttp

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseIdleConnections

func CloseIdleConnections(transport http.RoundTripper)

func NewClient

func NewClient(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, options option.V2RayHTTPOptions, 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 ConnectionPool

type ConnectionPool interface {
	CloseIdleConnections()
}

type HTTP2Conn

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

func NewHTTPConn

func NewHTTPConn(reader io.Reader, writer io.Writer) HTTP2Conn

func NewLateHTTPConn

func NewLateHTTPConn(writer io.Writer) *HTTP2Conn

func (*HTTP2Conn) Close

func (c *HTTP2Conn) Close() error

func (*HTTP2Conn) LocalAddr

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

func (*HTTP2Conn) NeedAdditionalReadDeadline

func (c *HTTP2Conn) NeedAdditionalReadDeadline() bool

func (*HTTP2Conn) Read

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

func (*HTTP2Conn) RemoteAddr

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

func (*HTTP2Conn) SetDeadline

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

func (*HTTP2Conn) SetReadDeadline

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

func (*HTTP2Conn) SetWriteDeadline

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

func (*HTTP2Conn) Setup

func (c *HTTP2Conn) Setup(reader io.Reader, err error)

func (*HTTP2Conn) Write

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

type HTTP2ConnWrapper

type HTTP2ConnWrapper struct {
	N.ExtendedConn
	// contains filtered or unexported fields
}

func NewHTTP2Wrapper

func NewHTTP2Wrapper(conn net.Conn) *HTTP2ConnWrapper

func (*HTTP2ConnWrapper) Close

func (w *HTTP2ConnWrapper) Close() error

func (*HTTP2ConnWrapper) CloseWrapper

func (w *HTTP2ConnWrapper) CloseWrapper()

func (*HTTP2ConnWrapper) Upstream

func (w *HTTP2ConnWrapper) Upstream() any

func (*HTTP2ConnWrapper) Write

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

func (*HTTP2ConnWrapper) WriteBuffer

func (w *HTTP2ConnWrapper) WriteBuffer(buffer *buf.Buffer) error

type HTTPConn

type HTTPConn struct {
	net.Conn
	// contains filtered or unexported fields
}

func NewHTTP1Conn

func NewHTTP1Conn(conn net.Conn, request *http.Request) *HTTPConn

func (*HTTPConn) NeedHandshake

func (c *HTTPConn) NeedHandshake() bool

func (*HTTPConn) Read

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

func (*HTTPConn) ReaderReplaceable

func (c *HTTPConn) ReaderReplaceable() bool

func (*HTTPConn) Upstream

func (c *HTTPConn) Upstream() any

func (*HTTPConn) Write

func (c *HTTPConn) Write(b []byte) (int, error)

func (*HTTPConn) WriterReplaceable

func (c *HTTPConn) WriterReplaceable() bool

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 ServerHTTPConn

type ServerHTTPConn struct {
	HTTP2Conn
	Flusher http.Flusher
}

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