sniff

package
v1.10.0-beta.9 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: GPL-2.0 Imports: 26 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrClientHelloFragmented = E.New("need more packet for chromium QUIC connection")

Functions

func BitTorrent added in v1.10.0

func BitTorrent(_ context.Context, metadata *adapter.InboundContext, reader io.Reader) error

BitTorrent detects if the stream is a BitTorrent connection. For the BitTorrent protocol specification, see https://www.bittorrent.org/beps/bep_0003.html

func DTLSRecord added in v1.10.0

func DTLSRecord(ctx context.Context, metadata *adapter.InboundContext, packet []byte) error

func DomainNameQuery

func DomainNameQuery(ctx context.Context, metadata *adapter.InboundContext, packet []byte) error

func HTTPHost

func HTTPHost(_ context.Context, metadata *adapter.InboundContext, reader io.Reader) error

func PeekPacket

func PeekPacket(ctx context.Context, metadata *adapter.InboundContext, packet []byte, sniffers ...PacketSniffer) error

func PeekStream

func PeekStream(ctx context.Context, metadata *adapter.InboundContext, conn net.Conn, buffer *buf.Buffer, timeout time.Duration, sniffers ...StreamSniffer) error

func QUICClientHello

func QUICClientHello(ctx context.Context, metadata *adapter.InboundContext, packet []byte) error

func RDP added in v1.10.0

func RDP(_ context.Context, metadata *adapter.InboundContext, reader io.Reader) error

func SSH added in v1.10.0

func SSH(_ context.Context, metadata *adapter.InboundContext, reader io.Reader) error

func STUNMessage

func STUNMessage(_ context.Context, metadata *adapter.InboundContext, packet []byte) error

func Skip added in v1.9.5

func Skip(metadata adapter.InboundContext) bool

func StreamDomainNameQuery

func StreamDomainNameQuery(readCtx context.Context, metadata *adapter.InboundContext, reader io.Reader) error

func TLSClientHello

func TLSClientHello(ctx context.Context, metadata *adapter.InboundContext, reader io.Reader) error

func UDPTracker added in v1.10.0

func UDPTracker(_ context.Context, metadata *adapter.InboundContext, packet []byte) error

UDPTracker detects if the packet is a UDP Tracker Protocol packet. For the UDP Tracker Protocol specification, see https://www.bittorrent.org/beps/bep_0015.html

func UTP added in v1.10.0

func UTP(_ context.Context, metadata *adapter.InboundContext, packet []byte) error

UTP detects if the packet is a uTP connection packet. For the uTP protocol specification, see

  1. https://www.bittorrent.org/beps/bep_0029.html
  2. https://github.com/bittorrent/libutp/blob/2b364cbb0650bdab64a5de2abb4518f9f228ec44/utp_internal.cpp#L112

Types

type PacketSniffer

type PacketSniffer = func(ctx context.Context, metadata *adapter.InboundContext, packet []byte) error

type StreamSniffer

type StreamSniffer = func(ctx context.Context, metadata *adapter.InboundContext, reader io.Reader) error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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