hack

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package hack includes wraps and hacks of Go net stack.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIncompleteClientHello = errors.New("incomplete client hello")
)

Functions

This section is empty.

Types

type ChannelListener

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

func NewChannelListener

func NewChannelListener(ctx context.Context) *ChannelListener

func (*ChannelListener) Accept

func (ln *ChannelListener) Accept() (net.Conn, error)

func (*ChannelListener) Addr

func (ln *ChannelListener) Addr() net.Addr

func (*ChannelListener) Close

func (ln *ChannelListener) Close() error

func (*ChannelListener) SendToChannel added in v0.3.0

func (ln *ChannelListener) SendToChannel(conn net.Conn)

type HijackClientHelloConn added in v0.3.0

type HijackClientHelloConn struct {

	// verbose log func
	VerboseLogFunc func(string, ...any)
	// contains filtered or unexported fields
}

func NewHijackClientHelloConn added in v0.3.0

func NewHijackClientHelloConn(conn net.Conn) *HijackClientHelloConn

func (*HijackClientHelloConn) Close added in v0.3.0

func (c *HijackClientHelloConn) Close() error

func (*HijackClientHelloConn) GetClientHello added in v0.3.0

func (c *HijackClientHelloConn) GetClientHello() ([]byte, error)

func (*HijackClientHelloConn) LocalAddr added in v0.3.0

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

func (*HijackClientHelloConn) Read added in v0.3.0

func (c *HijackClientHelloConn) Read(b []byte) (int, error)

func (*HijackClientHelloConn) RemoteAddr added in v0.3.0

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

func (*HijackClientHelloConn) SetDeadline added in v0.3.0

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

func (*HijackClientHelloConn) SetReadDeadline added in v0.3.0

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

func (*HijackClientHelloConn) SetWriteDeadline added in v0.3.0

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

func (*HijackClientHelloConn) Write added in v0.3.0

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

type TLSClientHelloConn

type TLSClientHelloConn struct {
	Conn              *tls.Conn
	ClientHelloRecord []byte
	Done              context.CancelFunc
}

func (*TLSClientHelloConn) Close

func (c *TLSClientHelloConn) Close() error

func (*TLSClientHelloConn) LocalAddr

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

func (*TLSClientHelloConn) Read

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

func (*TLSClientHelloConn) RemoteAddr

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

func (*TLSClientHelloConn) SetDeadline

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

func (*TLSClientHelloConn) SetReadDeadline

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

func (*TLSClientHelloConn) SetWriteDeadline

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

func (*TLSClientHelloConn) Write

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