sniffer

package
v1.65.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakePacketConn

func NewFakePacketConn(r io.Reader) net.PacketConn

func SniffHTTP

func SniffHTTP(conn net.Conn, timeout time.Duration) string

func SniffQUIC

func SniffQUIC(conn net.PacketConn, timeout time.Duration) string

func SniffTLS

func SniffTLS(conn net.Conn, timeout time.Duration) string

func ToLowerASCII

func ToLowerASCII(s string) string

func VerifyHostnameInSNI

func VerifyHostnameInSNI(s string) bool

VerifyHostnameInSNI reports whether s is a valid hostname.

Literal IP addresses and absolute FQDNs are not permitted as SNI values. See RFC 6066, Section 3.

Types

type ReadOnlyConn

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

func StreamReadOnlyConn

func StreamReadOnlyConn(conn net.Conn) *ReadOnlyConn

func (ReadOnlyConn) Close

func (b ReadOnlyConn) Close() error

func (ReadOnlyConn) LocalAddr

func (b ReadOnlyConn) LocalAddr() net.Addr

func (ReadOnlyConn) Read

func (b ReadOnlyConn) Read(p []byte) (n int, err error)

func (ReadOnlyConn) RemoteAddr

func (b ReadOnlyConn) RemoteAddr() net.Addr

func (ReadOnlyConn) SetDeadline

func (b ReadOnlyConn) SetDeadline(t time.Time) error

func (ReadOnlyConn) SetReadDeadline

func (b ReadOnlyConn) SetReadDeadline(t time.Time) error

func (ReadOnlyConn) SetWriteDeadline

func (b ReadOnlyConn) SetWriteDeadline(t time.Time) error

func (ReadOnlyConn) UnreadConn

func (b ReadOnlyConn) UnreadConn() net.Conn

func (ReadOnlyConn) Write

func (b ReadOnlyConn) Write(_ []byte) (n int, err error)

type ReadOnlyPacketConn

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

func StreamReadOnlyPacketConn

func StreamReadOnlyPacketConn(conn net.PacketConn) *ReadOnlyPacketConn

func (ReadOnlyPacketConn) Close

func (ReadOnlyPacketConn) Close() error

func (ReadOnlyPacketConn) LocalAddr

func (b ReadOnlyPacketConn) LocalAddr() net.Addr

func (ReadOnlyPacketConn) ReadFrom

func (b ReadOnlyPacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)

func (ReadOnlyPacketConn) SetDeadline

func (b ReadOnlyPacketConn) SetDeadline(t time.Time) error

func (ReadOnlyPacketConn) SetReadBuffer

func (b ReadOnlyPacketConn) SetReadBuffer(_ int) error

func (ReadOnlyPacketConn) SetReadDeadline

func (b ReadOnlyPacketConn) SetReadDeadline(t time.Time) error

func (ReadOnlyPacketConn) SetWriteBuffer

func (b ReadOnlyPacketConn) SetWriteBuffer(_ int) error

func (ReadOnlyPacketConn) SetWriteDeadline

func (b ReadOnlyPacketConn) SetWriteDeadline(t time.Time) error

func (ReadOnlyPacketConn) UnreadPacketConn

func (b ReadOnlyPacketConn) UnreadPacketConn() net.PacketConn

func (ReadOnlyPacketConn) WriteTo

func (b ReadOnlyPacketConn) WriteTo(p []byte, _ net.Addr) (n int, err error)

type SniffingType

type SniffingType int
const (
	OFF SniffingType = iota
	HTTP
	TLS
	QUIC
)

func (SniffingType) String

func (s SniffingType) String() string

Jump to

Keyboard shortcuts

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