collector

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(c Collector)

func Start

func Start(config CollectConfig)

Types

type CollectConfig

type CollectConfig struct {
	CollectDest    bool
	CollectTracing bool
	ClashHost      string
	ClashToken     string
}

type Collector

type Collector interface {
	Name() string
	Collect(config CollectConfig) error
}

type Connection

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

func (*Connection) Collect

func (c *Connection) Collect(config CollectConfig) error

func (*Connection) Name

func (c *Connection) Name() string

type Connections

type Connections struct {
	ID          string    `json:"id"`
	Metadata    Metadata  `json:"metadata"`
	Upload      int       `json:"upload"`
	Download    int       `json:"download"`
	Start       time.Time `json:"start"`
	Chains      []string  `json:"chains"`
	Rule        string    `json:"rule"`
	RulePayload string    `json:"rulePayload"`
}

type Info

type Info struct{}

func (*Info) Collect

func (*Info) Collect(config CollectConfig) error

func (*Info) Name

func (*Info) Name() string

type Metadata

type Metadata struct {
	Network         string `json:"network"`
	Type            string `json:"type"`
	SourceIP        string `json:"sourceIP"`
	DestinationIP   string `json:"destinationIP"`
	SourcePort      string `json:"sourcePort"`
	DestinationPort string `json:"destinationPort"`
	Host            string `json:"host"`
	DNSMode         string `json:"dnsMode"`
	ProcessPath     string `json:"processPath"`
	SpecialProxy    string `json:"specialProxy"`
}

type Tracing

type Tracing struct {
}

func (*Tracing) Collect

func (t *Tracing) Collect(config CollectConfig) error

func (*Tracing) Name

func (t *Tracing) Name() string

Jump to

Keyboard shortcuts

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