types

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN added in v0.8.0

type ASN struct {
	ASN     uint32
	Country string
}

type ASNList added in v0.8.0

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

func NewASNList added in v0.8.0

func NewASNList() *ASNList

func (*ASNList) Load added in v0.8.0

func (l *ASNList) Load() *bart.Table[ASN]

func (*ASNList) Lookup added in v0.8.0

func (l *ASNList) Lookup(addr netip.Addr) (ASN, bool)

func (*ASNList) Store added in v0.8.0

func (l *ASNList) Store(list *bart.Table[ASN])

type CountryList added in v0.8.0

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

func NewCountryList added in v0.8.0

func NewCountryList() *CountryList

func (*CountryList) GetAll added in v0.8.0

func (l *CountryList) GetAll() []string

func (*CountryList) Lookup added in v0.8.0

func (l *CountryList) Lookup(country string) bool

func (*CountryList) Remove added in v0.8.0

func (l *CountryList) Remove(countries []string) error

func (*CountryList) Upsert added in v0.8.0

func (l *CountryList) Upsert(coutries []string) error

type DomainList

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

func NewDomainList

func NewDomainList() *DomainList

func (*DomainList) GetAll

func (l *DomainList) GetAll() []string

func (*DomainList) Lookup

func (l *DomainList) Lookup(domain string) bool

func (*DomainList) Remove

func (l *DomainList) Remove(domains []string) error

func (*DomainList) Upsert

func (l *DomainList) Upsert(domains []string) error

type Packet added in v0.5.1

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

func NewPacket added in v0.5.1

func NewPacket(payload []byte) *Packet

func (*Packet) GetASN added in v0.7.0

func (p *Packet) GetASN(asnlist *ASNList) (ASN, bool)

NOTE: pass nil as ASNList to get ASN from cache

func (*Packet) GetDomains added in v0.5.1

func (p *Packet) GetDomains() []string

func (*Packet) GetDstIP added in v0.9.0

func (p *Packet) GetDstIP() (netip.Addr, bool)

func (*Packet) GetDstPort added in v0.9.0

func (p *Packet) GetDstPort() (uint16, bool)

func (*Packet) GetJA3 added in v0.5.1

func (p *Packet) GetJA3() (string, bool)

func (*Packet) GetProto added in v0.9.0

func (p *Packet) GetProto() (layers.IPProtocol, bool)

func (*Packet) GetReversedDomains added in v0.5.1

func (p *Packet) GetReversedDomains() []string

func (*Packet) GetSNI added in v0.5.1

func (p *Packet) GetSNI() (string, bool)

func (*Packet) GetSrcIP added in v0.5.1

func (p *Packet) GetSrcIP() (netip.Addr, bool)

func (*Packet) GetSrcPort added in v0.9.0

func (p *Packet) GetSrcPort() (uint16, bool)

func (*Packet) IsTrusted added in v1.0.0

func (p *Packet) IsTrusted() bool

type SubnetList

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

func NewSubnetList

func NewSubnetList() *SubnetList

func (*SubnetList) GetAll

func (l *SubnetList) GetAll() []netip.Prefix

func (*SubnetList) Lookup

func (l *SubnetList) Lookup(subnet netip.Prefix) bool

func (*SubnetList) Remove

func (l *SubnetList) Remove(subnets []netip.Prefix) error

func (*SubnetList) Upsert

func (l *SubnetList) Upsert(subnets []netip.Prefix) error

Jump to

Keyboard shortcuts

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