httptunnel

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const RelayBufferSize = cipherstream.MaxCipherRelaySize
View Source
const RequestIDHeader = "X-Request-UID"

Variables

This section is empty.

Functions

func NewRoundTrip

func NewRoundTrip(serverAddr string, helloID utls.ClientHelloID, timeout time.Duration, rootCAs *x509.CertPool) *roundTrip

Types

type LocalConn

type LocalConn struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewLocalConn

func NewLocalConn(client *http.Client, serverAddr string) (*LocalConn, error)

func (*LocalConn) Close

func (l *LocalConn) Close() error

func (*LocalConn) LocalAddr

func (l *LocalConn) LocalAddr() net.Addr

func (*LocalConn) Read

func (l *LocalConn) Read(b []byte) (n int, err error)

func (*LocalConn) RemoteAddr

func (l *LocalConn) RemoteAddr() net.Addr

func (*LocalConn) SetDeadline

func (l *LocalConn) SetDeadline(t time.Time) error

SetDeadline if the deadline time fired, then the LocalConn can't be used anymore

func (*LocalConn) SetReadDeadline

func (l *LocalConn) SetReadDeadline(t time.Time) error

func (*LocalConn) SetWriteDeadline

func (l *LocalConn) SetWriteDeadline(t time.Time) error

func (*LocalConn) Write

func (l *LocalConn) Write(b []byte) (n int, err error)

type Server

type Server struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewServer

func NewServer(addr string, timeout time.Duration, tlsConfig *tls.Config) *Server

func (*Server) Accept

func (s *Server) Accept() (net.Conn, error)

func (*Server) Close

func (s *Server) Close() error

func (*Server) CloseConn

func (s *Server) CloseConn(reqID string)

func (*Server) Listen

func (s *Server) Listen()

type ServerConn

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

func NewServerConn

func NewServerConn(reqID string, closeConn func(reqID string)) *ServerConn

func (*ServerConn) Close

func (c *ServerConn) Close() error

func (*ServerConn) LocalAddr

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

func (*ServerConn) Read

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

func (*ServerConn) ReadLocal

func (c *ServerConn) ReadLocal(b []byte) (n int, err error)

func (*ServerConn) RemoteAddr

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

func (*ServerConn) SetDeadline

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

func (*ServerConn) SetReadDeadline

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

func (*ServerConn) SetWriteDeadline

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

func (*ServerConn) Write

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

func (*ServerConn) WriteLocal

func (c *ServerConn) WriteLocal(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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