wg

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dump

type Dump struct {
	PrivateKey string
	PublicKey  string
	ListenPort uint16
	FwMark     uint32

	Peers []DumpPeer
}

func NewDump

func NewDump(r io.Reader) (Dump, error)

func (*Dump) OldestHandshake

func (self *Dump) OldestHandshake() *DumpPeer

func (*Dump) Parse

func (self *Dump) Parse(r io.Reader) error

func (*Dump) Peer

func (self *Dump) Peer(name string) *DumpPeer

type DumpPeer

type DumpPeer struct {
	PublicKey       string
	PresharedKey    string
	Endpoint        string
	AllowedIPs      []string
	LatestHandshake time.Time
	Rx              uint64
	Tx              uint64
	Keepalive       time.Duration
	// contains filtered or unexported fields
}

func NewDumpPeer

func NewDumpPeer(rec []string) (DumpPeer, error)

func (*DumpPeer) HandshakeBefore

func (self *DumpPeer) HandshakeBefore(p *DumpPeer) bool

func (*DumpPeer) Name

func (self *DumpPeer) Name() string

func (*DumpPeer) Parse

func (self *DumpPeer) Parse(rec []string) error

func (*DumpPeer) Valid

func (self *DumpPeer) Valid() bool

Jump to

Keyboard shortcuts

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