v2rayhttp

package
v1.8.0-alpha.14 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: GPL-2.0 Imports: 27 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseIdleConnections added in v1.2.2

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 added in v1.2.2

func (c *Client) Close() error

func (*Client) DialContext

func (c *Client) DialContext(ctx context.Context) (net.Conn, error)

type ConnectionPool added in v1.2.2

type ConnectionPool interface {
	CloseIdleConnections()
}

type HTTP2Conn added in v1.2.3

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

func NewHTTPConn added in v1.2.0

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

func NewLateHTTPConn added in v1.2.5

func NewLateHTTPConn(writer io.Writer) *HTTP2Conn

func (*HTTP2Conn) Close added in v1.2.3

func (c *HTTP2Conn) Close() error

func (*HTTP2Conn) LocalAddr added in v1.2.3

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

func (*HTTP2Conn) NeedAdditionalReadDeadline added in v1.2.5

func (c *HTTP2Conn) NeedAdditionalReadDeadline() bool

func (*HTTP2Conn) Read added in v1.2.3

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

func (*HTTP2Conn) RemoteAddr added in v1.2.3

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

func (*HTTP2Conn) SetDeadline added in v1.2.3

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

func (*HTTP2Conn) SetReadDeadline added in v1.2.3

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

func (*HTTP2Conn) SetWriteDeadline added in v1.2.3

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

func (*HTTP2Conn) Setup added in v1.2.5

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

func (*HTTP2Conn) Write added in v1.2.3

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

type HTTP2ConnWrapper added in v1.1.3

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

func NewHTTP2Wrapper added in v1.1.3

func NewHTTP2Wrapper(conn net.Conn) *HTTP2ConnWrapper

func (*HTTP2ConnWrapper) Close added in v1.3.0

func (w *HTTP2ConnWrapper) Close() error

func (*HTTP2ConnWrapper) CloseWrapper added in v1.1.3

func (w *HTTP2ConnWrapper) CloseWrapper()

func (*HTTP2ConnWrapper) Upstream added in v1.1.3

func (w *HTTP2ConnWrapper) Upstream() any

func (*HTTP2ConnWrapper) Write added in v1.1.3

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

func (*HTTP2ConnWrapper) WriteBuffer added in v1.1.3

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

type HTTPConn

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

func NewHTTP1Conn added in v1.2.3

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

func (*HTTPConn) NeedHandshake added in v1.2.3

func (c *HTTPConn) NeedHandshake() bool

func (*HTTPConn) Read

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

func (*HTTPConn) ReaderReplaceable added in v1.2.3

func (c *HTTPConn) ReaderReplaceable() bool

func (*HTTPConn) Upstream added in v1.2.3

func (c *HTTPConn) Upstream() any

func (*HTTPConn) Write

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

func (*HTTPConn) WriterReplaceable added in v1.2.3

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